babel-plugin-fn-call-operator

1.0.5 • Public • Published

babel-plugin-fn-call-operator

just like Haskell's '$' operator.

Examples

store.dispatch << setTagForm({'name': val.target.value})

Turn into

store.dispatch(setTagForm({'name': val.target.value}))

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 fn-call" directive as described in the original one.

Installation

$ npm install --save-dev babel-plugin-fn-call-operator

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["fn-call-operator"]
}

Via CLI

$ babel --plugins fn-call-operator script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["fn-call-operator"]
});

License

MIT

Package Sidebar

Install

npm i babel-plugin-fn-call-operator

Weekly Downloads

5

Version

1.0.5

License

MIT

Unpacked Size

123 kB

Total Files

8

Last publish

Collaborators

  • freemem