`eval`
`eval` DSL
//
function apply_tpl(tpl, dict){
Object.keys(dict).forEach(function(k) {tpl = tpl.replace(new RegExp('\\${' + k + '}','g'), dict[k]);})
return tpl;
}
// :
apply_tpl("Hello, ${name}", { name: "Arthur"} )
// => Hello, Arthur.
// : ()
var value1 = "Cathy"
apply_tpl("Hello, ${value1}", this)
// => "Hello, Cathy"
apply_tpl("Hello, ${value2}", this)
// => "Hello, ${value2}"