1.0.5 • Published 4 years ago

babel-plugin-fn-call-operator v1.0.5

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

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