Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "pino", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "fast and simple logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -102,3 +102,3 @@ 'use strict' | ||
for (var key in obj) { | ||
if (obj[key]) { | ||
if (obj.hasOwnProperty(key) && obj[key] !== undefined) { | ||
data += ',"' + key + '":' + stringify(obj[key]) | ||
@@ -105,0 +105,0 @@ } |
25
test.js
@@ -228,1 +228,26 @@ 'use strict' | ||
}) | ||
test('set properties defined in the prototype chain', 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() | ||
})) | ||
function MyObject () { | ||
this.hello = 'world' | ||
} | ||
MyObject.prototype.some = function () {} | ||
instance.info(new MyObject()) | ||
}) |
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
235750
490