Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

fj-pipe

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fj-pipe

Pipe functions, FP style.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
17
-26.09%
Maintainers
2
Weekly downloads
 
Created
Source

fj-pipe

Build Status npm version

pipe with ease.

Installation

npm install fj-pipe --save

Usage

var pipe = require('fj-pipe');

const add1 = (x) => x + 1,
mult2 = (x) => x * 2,
square = (x) => x * x;

const pipe1 = pipe(add1),
pipe2 = pipe(add1, mult2),
pipe3 = pipe(add1, mult2, square);

pipe1(0); // 1
// === add1(0)

pipe2(1); // 4
// === mult2(add1(0))

pipe3(1); // 16
// === square(mult2(add1(0)))

Keywords

fp-dom

FAQs

Package last updated on 15 Feb 2015

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