pipeline-operator
v1.1.0
Published
Functional implementation of the pipeline operator |>
Downloads
3
Maintainers
Readme
js-pipeline
pipeline-operator : A functional implementation of the pipeline operator
Installation
on the web:
<script src="https://unpkg.com/pipeline-operator/index.js"></script>
via npm:
NOTE: Module support in Node still is experimental.
Node 8 does not support it.
Node 9 requires a flag and special file extension.
See the Node API Docs for up-to-date information.
$ npm install --save pipeline-operator
via yarn:
$ yarn add pipeline-operator
Basic Usage
// done with |>
let result = "hello"
|> doubleSay
|> capitalize
|> exclaim;
// import with pipeline (npm)
import pipeline from "pipeline-operator";
// import on web
import pipeline from "./pipeline-operator/index.js";
// equivalent code
let result = pipeline(
"hello",
doubleSay,
capitalize,
exclaim
);
Credits
License
MIT, see LICENSE