babel-plugin-method-unchaining
v1.1.2
Published
Transforms method chaining to sequence of expressions.
Downloads
15
Readme
babel-plugin-method-unchaining
Transforms method chaining to sequence of expressions.
Example
In
var result = Class.newBuilder().build();
Out
var _a;
var result = (_a = Class.newBuilder(), _a.build)();
_a = undefined;
Installation
npm install babel-plugin-method-unchaining
Usage
Via .babelrc
.babelrc
{
"plugins": ["babel-plugin-method-unchaining"]
}
Via CLI
babel --plugins babel-plugin-method-unchaining script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["babel-plugin-method-unchaining"]
});