MultiCB
Simple way to aggregate multiple node-style callbacks
var multicb = require('multicb')
var done = multicb()
doAsync(done())
doAsync(done())
doAsync(done())
done(function(err, results) {
console.log(err)
console.log(results)
})
var done = multicb({ pluck: 1 })
doAsync(done())
doAsync(done())
doAsync(done())
done(function(err, results) {
console.log(err)
console.log(results)
})
var done = multicb({ pluck: 1, spread: true })
doAsync(done())
doAsync(done())
doAsync(done())
done(function(err, a, b, c) {
console.log(err)
console.log(a)
console.log(b)
console.log(c)
})