pipe-operator
A small library for creating pipelines in JavaScript. This mimics the pipe operator in other functional languages such as Elixir.
Installation
npm install pipe-operator
const take native = ;
Usage
let frequentWords = ; { /* ... */ } { /* ... */ } { /* ... */ }
pipe()
can also take additional arguments for the passed in function:
let total = ; // total === 10 { return args;}
If you want to pipe to built-in prototype methods, use the native()
function:
let languages = ; // languages === ['JavaScript', 'Elixir', 'PHP'] // OR let languages = ; // languages === ['JavaScript', 'Elixir', 'PHP']
Thanks to Sebastiaan Luca for the API inspiration.