New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ndhoule/compose

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndhoule/compose

Compose a list of functions into a single function.

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

compose CI

Compose a list of functions into a single function.

Installation

$ component install ndhoule/compose
$ npm install @ndhoule/compose

API

compose(...funcs: Function)

Creates a function that is the composition of a list of functions, where each function is passed the return value of the previous function.

Compose is right-associative, which means functions are called in right-to-left order. For example, the operation h(g(f())) is represented as compose(h, g, f).

var add = function(a, b) { return a + b; };
var square = function(x) { return x * x; };
var addThenSquare = compose(square, add);

addThenSquare(1, 2); //=> 9

License

Released under the MIT license.

Keywords

component

FAQs

Package last updated on 02 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts