pipeline-operator

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i pipeline-operator

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

3.13 kB

Total Files

4

Last publish

Collaborators

  • nektro