2.1.0 • Published 8 years ago

waterfall-then v2.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

waterfall-then

NPM version Build status Test coverage Dependency Status License Downloads

Sequentially resolve a series of promise-returning function, returning the previous function's values.

const waterfall = require('waterfall-then')
const assert = require('assert')

const fn = waterfall([
  val => {
    assert.equal(val, 0)
    return Promise.resolve(1)
  },
  val => {
    assert.equal(val, 1)
    return Promise.resolve(2)
  },
  val => {
    assert.equal(val, 2)
    return Promise.resolve(3)
  }
])

fn(0).then(val => {
  assert.equal(val, 3)
})
2.1.0

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago