string.format
Advanced tools
Comparing version 1.2.5 to 1.3.0
@@ -22,3 +22,3 @@ /* jslint node: true */ | ||
try { | ||
replace = eval(capture); | ||
replace = contextEval(params,capture); | ||
replace = JSON.decycled(replace); | ||
@@ -48,2 +48,9 @@ if(typeof replace === 'string'){ | ||
return replaced; | ||
} | ||
function contextEval($__context,$__evaluation){ | ||
for(var i=0,k=Object.keys($__context),l=k.length;i<l;i++){ | ||
eval("var "+k[i]+" = $__context['"+k[i]+"'];"); | ||
} | ||
return eval($__evaluation); | ||
} |
{ | ||
"name": "string.format", | ||
"description": "String prototype method -> 'Hello {name}!'.format({name:'Homer'});", | ||
"version": "1.2.5", | ||
"version": "1.3.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Bifuer", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6734
49
3