Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zhoukekestar/dynamic-template-string

dynamic template string
https://github.com/zhoukekestar/dynamic-template-string

dynamic

Last synced: about 5 hours ago
JSON representation

dynamic template string

Awesome Lists containing this project

README

        

# dynamic-template-string

Deeply inspired by [stackoverflow](https://stackoverflow.com/a/37217166/4992897).

## Demo

```js
const assert = require('assert');
const Template = require('../');

var tpl = new Template('hello ${name}');

assert(tpl.fill({name: 'world'}) === 'hello world');
assert(tpl.fill({name: 'china'}) === 'hello china');
```