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

apr-compose

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-compose - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

readme.md

24

index.js
const waterfall = require('apr-waterfall');
const reverse = require('lodash.reverse');
/**
* <a id="sompose"></a>
* Creates a function which is a composition of the passed asynchronous functions. Each function consumes the return value of the function that follows. Composing functions f(), g(), and h() would produce the result of f(g(h())).
*
* [![](https://img.shields.io/npm/v/apr-compose.svg?style=flat-square)](https://www.npmjs.com/package/apr-compose) [![](https://img.shields.io/npm/l/apr-compose.svg?style=flat-square)](https://www.npmjs.com/package/apr-compose)
*
* @kind function
* @name compose
* @param {Function} function
* @returns {Function}
*
* @example
* import compose from 'apr-compose';
*
* const then = (v) => new Promise((resolve) => resolve(v));
*
* const composed = compose(
* async (v) => await then(v + 1),
* async (v) => await then(v + 2),
* async (v) => await then(v + 3)
* );
*
* const output = await composed(1); // 7
*/
module.exports = (...args) => {

@@ -5,0 +29,0 @@ return (value) => {

4

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

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

"dependencies": {
"apr-waterfall": "^1.0.1",
"apr-waterfall": "^1.0.2",
"lodash.reverse": "^4.0.1"
}
}
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