Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async integration #6

Open
tshelburne opened this issue Nov 22, 2014 · 0 comments
Open

Async integration #6

tshelburne opened this issue Nov 22, 2014 · 0 comments

Comments

@tshelburne
Copy link
Owner

When used with async, it's a bit inconvenient to use the mappers as opposed to the Constructors for loading. For instance:

async.parallel([ db.articles.all.bind(db.articles), db.projects.all.bind(db.projects), ... ]), function(err, results) {
    if (err) next(err);

    ... // whatever
});

Whereas with constructors:

async.parallel([ Article.all, Project.all, ... ]), function(err, results) {
    if (err) next(err);

    ... // whatever
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant