batch-then

Run multiple functions in parallel with concurrency

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
batch-then
701.1.08 years ago9 years agoMinified + gzip package size for batch-then in KB

Readme

batch-then
!NPM versionnpm-imagenpm-url !Build statustravis-imagetravis-url !Test coveragecoveralls-imagecoveralls-url !Dependency Statusdavid-imagedavid-url !Licenselicense-imagelicense-url !Downloadsdownloads-imagedownloads-url
Run multiple functions in parallel with concurrency. Only supports functions that return promises.
var Batch = require('batch-then');

var batch = new Batch();
batch.concurrency(2);

batch.push(function () {
  return Promise.resolve(1);
});

batch.push(function () {
  return Promise.resolve(2);
});

batch.push(function () {
  return Promise.resolve(3);
});

batch.then( => );