promise.waterfall
Runs an array of promises in series, each passing their results to the next promise in the array.
Last updated 3 years ago by notjrbauer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install promise.waterfall 
SYNC missed versions from official npm registry.

promise-waterfall

Runs an array of promises in series, each passing their results to the next promise in the array.

NPM

Install

$ npm install promise.waterfall --save

Usage

var promiseWaterfall = require('promise.waterfall')

function makeAdder (a) {
  return function (b) {
    b = b || 0
    return Promise.resolve(a + b)
  }
}

var addOne = makeAdder(1)

promiseWaterfall([
  addOne  // 1
  addOne, // 2
  addOne  // 3
])
.then(console.log)
.catch(console.error)

API

promiseWaterfall(functions) -> promise

Runs the array of functions in series, waiting for each to resolve and passing each result to the next function in the array.

functions

Required Type: array[function]

Current Tags

  • 3.2.0                                ...           latest (3 years ago)

13 Versions

  • 3.2.0                                ...           3 years ago
  • 3.1.5                                ...           3 years ago
  • 3.1.4                                ...           5 years ago
  • 3.1.3                                ...           5 years ago
  • 3.1.1                                ...           5 years ago
  • 1.1.7                                ...           5 years ago
  • 1.1.6                                ...           5 years ago
  • 1.1.5                                ...           5 years ago
  • 1.1.4                                ...           5 years ago
  • 1.1.3                                ...           5 years ago
  • 1.1.2                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 4
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |