apr-waterfall

3.0.3 • Public • Published

waterfall

Runs the tasks array of functions in series, each passing their results to the next in the array.

Parameters

Examples

import waterfall from 'apr-waterfall';
 
const then = (v) => new Promise((resolve) => resolve(v));
 
const output = await waterfall([
  async () => await then(1),
  async (v) => await then(+ 2),
  async (v) => await then(+ 3)
]);
 
// output = 6

Returns Promise

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.3
    0
    • latest

Version History

Package Sidebar

Install

npm i apr-waterfall

Weekly Downloads

0

Version

3.0.3

License

MIT

Last publish

Collaborators

  • ramitos