New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apr-waterfall

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apr-waterfall - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

readme.md

25

index.js
const each = require('apr-engine-each');
/**
* <a id="waterfall"></a>
* Runs the `tasks` array of functions in series, each passing their results to the next in the array.
*
* [![](https://img.shields.io/npm/v/apr-waterfall.svg?style=flat-square)](https://www.npmjs.com/package/apr-waterfall) [![](https://img.shields.io/npm/l/apr-waterfall.svg?style=flat-square)](https://www.npmjs.com/package/apr-waterfall)
*
* @kind function
* @name waterfall
* @param {Array<Function>|Object} tasks
* @param {Any} [initial]
* @returns {Promise}
*
* @example
* 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(v + 2),
* async (v) => await then(v + 3)
* ]);
*
* // output = 6
*/
module.exports = (input, initial) => {

@@ -4,0 +29,0 @@ let last = initial;

2

package.json
{
"name": "apr-waterfall",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/ramitos/apr/tree/master/packages/waterfall",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc