seed-parallel
v1.0.2
Published
Execute multiple async functions in parallel and get back ordered array of results
Downloads
36
Readme
parallel
Execute multiple async functions in parallel and get back ordered array of results
Installation
$ npm install seed-parallel --save
Usage
var parallel = require('seed-parallel');
function a(cb) {
cb(null, 'a');
}
function b(cb) {
setTimeout(cb, 1000, null, 'b');
}
function c(cb) {
process.nextTick(function() {
cb(null, 'c');
});
}
parallel(a, b, c, function(err, results) {
console.log(err, results); // null, ['a', 'b', 'c']
});
Development
$ git clone [email protected]:seedalpha/parallel.git
$ cd parallel
$ npm install
$ npm test
Author
Vladimir Popov [email protected]
License
MIT