Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "pino", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "fast and simple logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -102,3 +102,5 @@ 'use strict' | ||
for (var key in obj) { | ||
data += ',"' + key + '":' + stringify(obj[key]) | ||
if (obj[key]) { | ||
data += ',"' + key + '":' + stringify(obj[key]) | ||
} | ||
} | ||
@@ -105,0 +107,0 @@ data += '}' |
19
test.js
@@ -209,1 +209,20 @@ 'use strict' | ||
}) | ||
test('set undefined properties', function (t) { | ||
t.plan(2) | ||
var instance = pino(sink(function (chunk, enc, cb) { | ||
t.ok(Date.parse(chunk.time) <= new Date(), 'time is greater than Date.now()') | ||
delete chunk.time | ||
t.deepEqual(chunk, { | ||
pid: pid, | ||
hostname: hostname, | ||
level: 30, | ||
hello: 'world', | ||
v: 0 | ||
}) | ||
cb() | ||
})) | ||
instance.info({ hello: 'world', property: undefined }) | ||
}) |
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
235193
470