Skip to content

rubythonode/promise-whip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Whip your promises into shape??

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%