4 ], function(toString, get) {
6 var stache = /\{\{([^\}]+)\}\}/g; //mustache-like
11 function interpolate(template, replacements, syntax){
12 template = toString(template);
13 var replaceFn = function(match, prop){
14 return toString( get(replacements, prop) );
16 return template.replace(syntax || stache, replaceFn);