# es6-template-strings

> Compile and resolve template strings notation as specified in ES6

Latest version **2.0.1** (published 2016-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install es6-template-strings
pnpm add es6-template-strings
yarn add es6-template-strings
bun add es6-template-strings
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2016-08-12 |
| First published | 2013-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Author | Mariusz Nowak |
| Maintainers | medikoo |
| Keywords | es6, template, string, literal, literals, format, i18n, quasiliterals, multiline, localization, escape |

## Links

- npm: https://www.npmjs.com/package/es6-template-strings
- Repository: https://github.com/medikoo/es6-template-strings
- Homepage: https://github.com/medikoo/es6-template-strings#readme
- Issues: https://github.com/medikoo/es6-template-strings/issues
- npm.io page: https://npm.io/package/es6-template-strings

## Dependencies (2)

- [esniff](https://npm.io/package/esniff.md) ^1.1
- [es5-ext](https://npm.io/package/es5-ext.md) ^0.10.12

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2016-08-12
- 2.0.0 — 2015-09-03
- 1.0.0 — 2015-06-23
- 0.1.0 — 2014-04-28
- 0.0.0 — 2013-10-10

## README

# es6-template-strings
## Compile and resolve template strings notation as specified in ES6

### Usage

```javascript

var template = require('es6-template-strings');

// Hello WORLD!
console.log(template('Hello ${place.toUpperCase()}!', { place: "World" }));

// You can reuse same templates:
var compile = require('es6-template-strings/compile')
  , resolveToString = require('es6-template-strings/resolve-to-string')

  , compiled = compile('Welcome to ${siteName}, you are visitor number ${visitorNumber}!');

// Welcome to MySite, you are visitor number 137!
console.log(resolveToString(compiled, { siteName: "MySite", visitorNumber: 137 }));

// Welcome to OtherSite, you are visitor number 777!
console.log(resolveToString(compiled, { siteName: "OtherSite", visitorNumber: 777 }));

// You may prepare custom tag functions
var resolve = require('es6-template-strings/resolve');

var customTag = function (literals/*, …substitutions*/) {
	// Process input and return result string
};

// Output template processed by customTag:
customTag.apply(null, resolve(compiled, {/* context */}));
```

### Installation
#### NPM

In your project path:

	$ npm install es6-template-strings

##### Browser

You can easily bundle _es6-template-strings_ for browser with [modules-webmake](https://github.com/medikoo/modules-webmake)

## Tests [![Build Status](https://travis-ci.org/medikoo/es6-template-strings.png)](https://travis-ci.org/medikoo/es6-template-strings)

	$ npm test

---
_Source: https://npm.io/package/es6-template-strings · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
