Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logfmt

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logfmt - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

2

lib/stringify.js

@@ -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 @@

{
"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"'}

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