Skip to content

(pipeline-operator on npm) Functional implementation of the pipeline operator |>

License

Notifications You must be signed in to change notification settings

nektro/js-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

(pipeline-operator on npm) Functional implementation of the pipeline operator |>

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published