1.1.0 • Published 6 years ago

pipeline-operator v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

js-pipeline

pipeline-operator : A functional implementation of the pipeline operator

NPM

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