You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-eval

Package Overview
Dependencies
Maintainers
6
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-eval

Compile eval calls with string literals

6.22.0
latest
Source
npmnpm
Version published
Weekly downloads
218
28.24%
Maintainers
6
Weekly downloads
 
Created
Source

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

.babelrc

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

Via CLI

babel --plugins transform-eval script.js

Via Node API

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

Keywords

babel-plugin

FAQs

Package last updated on 20 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts