Socket
Book a DemoInstallSign in
Socket

backtick-template

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backtick-template

ES2015 backticks for ES3+ engines

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

ES2015 backticks for ES3+ engines build status Coverage Status

var template = require('backtick-template');

// just string
const info = 'template';
`some ${info}` === template('some ${info}', {info});

// passing through a transformer
transform `some ${info}` ===
    template(transform, 'some ${info}', {info});

// using it as String method
String.prototype.template = template.asMethod;

`some ${info}` === 'some ${info}'.template({info});

transform `some ${info}` ===
    'some ${info}'.template(transform, {info});

MIT Style License

Keywords

backtick

FAQs

Package last updated on 08 Nov 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