promise-whip

1.0.0 • Public • Published

promise-whip Build Status

This packages contains some tiny promise helper method. Internally it uses bluebird..

The helpers!

runSeq

Runs jobs in sequential order:

whip.runSeq([promise1, promise2]).then(function () {
  // This method will be executed once promise1 and
  // afterwards promise2 has been resolved.
});

runParallel

Runs jobs in parallel:

whip.runParallel([promise1, promise2]).then(function () {
  // This method will be executed once promise1 and
  // promise2 has been resolved.
});

An additional parameter can be passed which defines how many jobs should be executed in parallel:

// Will behave just like runSeq:
whip.runParallel([promise1, promise2], 1).then(function () {});

Dependencies

Readme

Keywords

none

Package Sidebar

Install

npm i promise-whip

Weekly Downloads

208

Version

1.0.0

License

MIT

Last publish

Collaborators

  • sdepold