Comparing version 1.0.5 to 1.1.0
@@ -10,5 +10,8 @@ "use strict"; | ||
return str.replace(/\$\{([^\}]+)\}/gm, function (match, p1) { | ||
return str.replace(/\\?\$\{([^\}]+)\}/gm, function (match, p1) { | ||
if (/^\\/.test(match)) { | ||
return match.substring(1); | ||
} | ||
return _.get(obj, p1) || ''; | ||
}); | ||
}; |
{ | ||
"name": "fmtr", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"description": "awesome string formatter", | ||
@@ -27,7 +27,7 @@ "main": "index.js", | ||
"dependencies": { | ||
"lodash": "^4.17.1" | ||
"lodash": "^4.17.4" | ||
}, | ||
"devDependencies": { | ||
"expect.js": "^0.3.1", | ||
"mocha": "^3.1.2", | ||
"mocha": "^3.4.1", | ||
"jshint": "^2.9.4" | ||
@@ -34,0 +34,0 @@ }, |
@@ -47,2 +47,6 @@ "use strict"; | ||
}); | ||
it('should support the "\" escape character', function () { | ||
expect(fmtr('\\${foo}')).to.be('${foo}'); | ||
}); | ||
}); |
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
5236
53
Updatedlodash@^4.17.4