1.0.0 • Published 1 year ago
@ptkhanh94npm/commodi-odio-alias v1.0.0
@ptkhanh94npm/commodi-odio-alias
Callback wrapper for cleaner async code. Main benefit is you don't need to write if (err) return cb(err)
.
Usage
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]);
}));
}));
};
License
MIT
1.0.0
1 year ago