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

babel-plugin-transform-string-raw

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-string-raw

replace `String.raw` with an ponyfill function

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by250%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-string-raw

Installation

npm install babel-plugin-transform-string-raw --save

replace String.raw with an ponyfill function.

Requirement

https://github.com/59naga/babel-plugin-transform-array-from

Installation

npm install babel-plugin-transform-string-raw --save

Example

In

String.raw`hoge${arg1}fuga${arg2}piyo`;

Out

var _stringRaw = String.raw || function(){...};
_stringRaw`hoge${arg1}fuga${arg2}piyo`;

Usage

.babelrc

{
  "plugins": ["babel-plugin-transform-string-raw"]
}

Via CLI

$ babel --plugins babel-plugin-transform-string-raw script.js

Via Node API

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

Development

Requirement global

  • NodeJS v0.12.13
  • Npm v3.7.1
git clone https://github.com/josephfrazier/babel-plugin-transform-string-raw
cd babel-plugin-transform-string-raw
npm install

npm test

License

MIT

Keywords

FAQs

Package last updated on 08 Mar 2018

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