src/tools.js
// strings, except the identifiers are executed as JavaScript code.
strings, except the identifiers are executed as JavaScript code.
strings except the identifiers are executed as JavaScript code .
function format(str, obj)
{
	return str.replace(/\${([^}]+)}/g, function(match, name) {
		try {
			return runWith("return (" + name + ");", obj);
		}
		catch (e) {
			return match;
		}
	});
}
function format ( str , obj ) { return str . replace ( / \${([^}]+)} / g , function ( match , name ) { try { return runWith ( "return (" + name + ");" , obj ) ; } catch ( e ) { return match ; } } ) ; }
strings, except the identifiers are executed as JavaScript code.
strings except the identifiers are executed as JavaScript code .