Next Perpendicular Moonlanding
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

babel-plugin-transform-eval

6.22.0 • Public • Published

babel-plugin-transform-eval

This plugin allows Babel to compile eval calls with string literals.

Example

In

eval("(() => 'foo')");

Out

eval("(function () { return 'foo'; })");

Installation

npm install --save-dev babel-plugin-transform-eval

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-eval"]
}

Via CLI

babel --plugins transform-eval script.js

Via Node API

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

Keywords

install

npm i babel-plugin-transform-eval

Downloadsweekly downloads

18

version

6.22.0

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar