+1
-1
@@ -17,3 +17,3 @@ exports.stringify = function(data){ | ||
| if(needs_escaping) value = value.replace(/["\\]/g, '\\$&'); | ||
| if(needs_quoting) value = '"' + value + '"'; | ||
| if(needs_quoting || needs_escaping) value = '"' + value + '"'; | ||
| if(value === '' && !is_null) value = '""'; | ||
@@ -20,0 +20,0 @@ |
+1
-1
| { | ||
| "name": "logfmt", | ||
| "version": "1.3.2", | ||
| "version": "1.4.0", | ||
| "description": "key=value logger and parser", | ||
@@ -5,0 +5,0 @@ "main": "logfmt.js", |
@@ -25,2 +25,7 @@ var logfmt = require('../logfmt'), | ||
| test("quotes strings with quotes in them", function(){ | ||
| var data = {foo: JSON.stringify({ bar: 'baz'})} | ||
| assert.equal('foo="{\\"bar\\":\\"baz\\"}"', logfmt.stringify(data)) | ||
| }) | ||
| test("escapes quotes within strings with spaces in them", function(){ | ||
@@ -27,0 +32,0 @@ var data = {foo: 'hello my "friend"'} |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
65433
0.31%1507
0.27%