npm

Need private packages and team management tools?Check out npm Orgs. »

es6-promise-series

0.2.2 • Public • Published

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) {
    ...
  });

install

npm i es6-promise-series

Downloadsweekly downloads

222

version

0.2.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability