🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

fmtr

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fmtr - npm Package Compare versions

Comparing version

to
1.1.0

5

index.js

@@ -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) || '';
});
};

6

package.json
{
"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}');
});
});