Callback wrapper for cleaner async code. Main benefit is you don't need to write if (err) return cb(err)
.
var @ptkhanh94npm/commodi-odio-alias = require('@ptkhanh94npm/commodi-odio-alias');
var doSomething = function(cb) {
getUsers(@ptkhanh94npm/commodi-odio-alias(cb)(function(users) {
getArticles(@ptkhanh94npm/commodi-odio-alias(cb)(function(articles) {
cb(null, [users, articles]);
}));
}));
};
MIT