json-templatem
v1.0.0
Published
json template base on `lodash.template`.
Downloads
1
Readme
json template base on lodash.template
.
Usage
'use strict';
const jsonTemplate = require('../index');
// const template = '{"${name}":"${value}"}';
const template = { "${name}" : "${value}" };
const c = jsonTemplate.template(template);
var obj = c.compiledJSON({ name: 'hello', value: 'world' });
console.log(obj);