Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.0.5 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}');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc