babel-plugin-transform-eval
v6.22.0
Published
Compile eval calls with string literals
Keywords
Readme
babel-plugin-transform-eval
Compile eval calls with string literals
Example
In
eval("(() => 'foo')");Out
eval("(function () { return 'foo'; })");Installation
$ npm install babel-plugin-transform-evalUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["transform-eval"]
}Via CLI
$ babel --plugins transform-eval script.jsVia Node API
require("babel-core").transform("code", {
plugins: ["transform-eval"]
});