Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-es2015-template-literals

Package Overview
Dependencies
Maintainers
6
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-template-literals

Compile ES2015 template literals to ES5

  • 6.22.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
decreased by-30.8%
Maintainers
6
Weekly downloads
 
Created
Source

babel-plugin-transform-es2015-template-literals

Compile ES2015 template literals to ES5

Example

In

`foo${bar}`;

Out

"foo" + bar;

Installation

npm install --save-dev babel-plugin-transform-es2015-template-literals

Usage

.babelrc

// without options
{
  "plugins": ["transform-es2015-template-literals"]
}

// with options
{
  "plugins": [
    ["transform-es2015-template-literals", {
      "loose": true,
      "spec": true
    }]
  ]
}

Via CLI

babel --plugins transform-es2015-template-literals script.js

Via Node API

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

Options

loose

In loose mode, tagged template literal objects aren't frozen.

spec

This option wraps all template literal expressions with String. See babel/babel#1065 for more info.

In

`foo${bar}`;

Out

"foo" + String(bar);

Keywords

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc