@babel/plugin-transform-eval
Compile eval calls with string literals
Last updated 3 years ago by hzoo .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @babel/plugin-transform-eval 
SYNC missed versions from official npm registry.

@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": ["@babel/plugin-transform-eval"]
}

Via CLI

babel --plugins @babel/plugin-transform-eval script.js

Via Node API

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

Current Tags

  • 7.0.0-beta.38                                ...           latest (3 years ago)

10 Versions

  • 7.0.0-beta.38                                ...           3 years ago
  • 7.0.0-beta.37                                ...           3 years ago
  • 7.0.0-beta.36                                ...           3 years ago
  • 7.0.0-beta.35                                ...           3 years ago
  • 7.0.0-beta.34                                ...           3 years ago
  • 7.0.0-beta.33                                ...           3 years ago
  • 7.0.0-beta.32                                ...           3 years ago
  • 7.0.0-beta.31                                ...           3 years ago
  • 7.0.0-beta.5                                ...           3 years ago
  • 7.0.0-beta.4                                ...           3 years ago
Downloads
Today 0
This Week 11
This Month 29
Last Day 0
Last Week 2
Last Month 22
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |