dimanche 22 mars 2015

Convert a string to a template string


Is it possible to create a template string as a usual string



let a="b:${b}";


an then convert it into a template string



let b=10;
console.log(a.template());//b:10


without eval, new Function and other means of dynamic code generation?





Aucun commentaire:

Enregistrer un commentaire