pipel
Simple pipelines in JS
Platform | Build Status |
---|---|
Linux | |
Windows |
Install
NPM
npm i pipel
CDN
- jsDelivr
- unpkg
Usage
Loading the module
CommonJS
const pipel = ;
Loading the CommonJS module provides the pipel function.
Browser
Loading the JavaScript file for the pipel provides the pipel function
Piping
pipel provides a curried function which allows to build pipelines.
Calling pipel returns a function which uses the given value as the seed for the pipeline.
The returned function must be provided with functions which reduces in sequence, returning the reduced result.
const result = `Next: ` xlength; console; // 7
Example
const map = { const result = ; for const i of source result; return result;}; const filter = { const result = ; for const i of source if result; return result;}; const result = ; for const i of result console;;
Output
Next: 4Next: 8Next: 12Next: 16Next: 20
Build
Clone the repo first, then run the following to install the dependencies
npm install
To build the coverages, run the test suite, the docs, and the distributable modules:
npm run build