@seedalpha/parallel

1.0.12 • Public • Published

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 git@github.com:seedalpha/parallel.git
$ cd parallel
$ npm install
$ npm test

Author

Vladimir Popov vlad@seedalpha.net

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @seedalpha/parallel

Weekly Downloads

0

Version

1.0.12

License

©2015 SeedAlpha

Unpacked Size

3.16 kB

Total Files

4

Last publish

Collaborators

  • tom.raggett.trcuk.com
  • ac_inc