New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

string-transformer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-transformer

A module helps you transform an ES2016 template literals into concatenated strings, or reverse it back

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-90.91%
Maintainers
1
Weekly downloads
 
Created
Source

string-transformer

NPM version

A module helps you transform an ES2016 template literals into concatenated strings, or reverse it back

an internal tool used by vscode-string-transformer

Install

npm i string-transformer

Usage

//convert ES2015 template literals into concatenated strings
import { toConcatenatedStrings } from 'string-transformer';

const es6string = '`test1${name}to${age}`';
const result = toConcatenatedStrings(es6string, '\'');

console.log('\'test1\' + name + \'to\' + age' === result);
//convert ES5 concatenated strings into template literals
import { toTemplateLiteral } from 'string-transformer';

const es5string = '\'test1\' + name + \' ok\'';
const result = toTemplateLiteral(es5string, '\'');

console.log('`test1${name} ok`' === result);

LICENSE

GPL v3 License

Keywords

string

FAQs

Package last updated on 20 Jul 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