callback-all
Aggregate all callback sequence into one array result.
npm install callback-all
var callbacks = require('callback-all')
var all = callbacks()
asyncFn1(all())
asyncFn2(all())
asyncFn3(all())
asyncFn4(all())
all(function (err, result) {
console.log(result)
})
yield
parallel callbacks in caco:
var caco = require('caco')
var callbacks = require('callback-all')
caco(function * (next) {
asyncFn1(all())
asyncFn2(all())
asyncFn3(all())
asyncFn4(all())
var result = yield all(next)
console.log(result)
})(function (err) {
})