Skip to content

der-On/es6-promise-series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

ES6 Promise.series

Execute promises in series

Usage

/**
 * Runs promises in series
 * @param  {Array} list of promises or functions returning promises
 * @param  {Number} (optional) number of concurrent promises, of omitted no concurrency will happen
 * @return {Promise}
 */
import series from 'series'

series([
 aPromise,
 anotherPromise
], 4)
  .then(function (results) {
    ...
  });

Old usage

/**
 * Runs promises in series
 * @param  {Array} list of promises or functions returning promises
 * @param  {Number} (optional) number of concurrent promises, of omitted no concurrency will happen
 * @return {Promise}
 */
Promise.series([
 aPromise,
 anotherPromise
], 4)
  .then(function (results) {
    ...
  });

About

Execute promises in series

Resources

Stars

Watchers

Forks

Packages

No packages published