yeah, because json-template
was taken
Because sometimes you have a template like this that needs to be a valid JSON:
var myTemplate = `{
"user": {
"age": "{{ age.computed }}",
"biography": "{{ biography }}",
"hasBlueEyes": "{{ eyes.areBlue }}",
}
}`;
with a dataset like this:
{
"biography": "Hello world, 42.",
"age":{
"computed": 25
},
"eyes":{
"areBlue": true
}
}
and you want this:
{
"user": {
"age": 25,
"biography": "Hello world, 42.",
"hasBlueEyes": true
}
}
npm install valid-json-template -S