uinix-fp
pipe utility.
This package is ESM-only and requires Node 12+.
npm install uinix-fp-pipe
pipe
allows chaining a sequence of functions in a pipeline.
import {pipe} from 'uinix-fp-pipe';
const greet = x => 'hello ' + x;
const uppercase = x => x.toUpperCase();
const exclaim = x => x + '!';
const shout = pipe([
greet,
uppercase,
exclaim
]); // curried
shout('Jesse'); // 'HELLO JESSE!'
This package exports the following identifiers: pipe
. There is no default export.
-
fs
(Function[]
) — An array of functions. -
x
(X
) — The input.
-
Y
— Output of transformingX
through the series of functions.