babel-plugin-pipe-operator
Overload the pipe operator (|
) to provide Elixir/F#/Shell-like behavior
Examples
; const array = 1 2 3 4 5; array| | ;
Disabling in current scope
If you want to use the original pipe operator, you can disable this plugin in current scope (and it children scopes) using "no pipe"
directive
const fn = { const arr = 1 2 3 | ; return { "no pipe"; arr; };};
Installation
$ npm install --save-dev babel-plugin-pipe-operator
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
$ babel --plugins pipe-operator script.js
Via Node API
;
License
MIT