Package Exports
- zoro
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zoro) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
zoro.js
Getting Started
$ npm install zoroUsage
zoro
.waterfall([
[Posts, 'get', 12345]
[Authors, 'get']
])
.done(function(result){
console.log(result);
})
.fail(function(err){
concole.log(err);
});case of express app
var zoro = require('zoro');
exports.render = function(req, res){
var id = req.params.id;
zoro
.parallel({
user : [Users, 'getById', id],
review : [Reviews, 'getByUser', id]
})
.done(function(result){
res.json(result);
})
.fail(function(err){
concole.log(err);
});
};Feature
zoro.waterfall()has about the same function as async.waterfall()zoro.series()has about the same function as async.series()zoro.parallel()has about the same function as async.parallel()zoro.done()defines a callback function when all async functions successzoro.fail()defines a callback function when any async functions errorzoro.always()defines a callback function when all async functions finishzoro.bind()changes context of async functions