Syntax do expressions
Syntax only
This plugin only allows Babel to parse this syntax. If you want to transform it then see transform-do-expressions.
This plugin allows Babel to parse do-expressions.
Installation
npm install --save-dev babel-plugin-syntax-do-expressions
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["syntax-do-expressions"]
}
Via CLI
babel --plugins syntax-do-expressions script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["syntax-do-expressions"]
});
© 2018 Sebastian McKenzie
Licensed under the MIT License.
http://babeljs.io/docs/plugins/syntax-do-expressions/