Comparing version 2.8.1 to 2.8.2
{ | ||
"name": "pino", | ||
"version": "2.8.1", | ||
"version": "2.8.2", | ||
"description": "fast and simple logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
24
pino.js
@@ -218,2 +218,4 @@ 'use strict' | ||
var value | ||
var key | ||
var keys | ||
if (obj) { | ||
@@ -223,9 +225,15 @@ if (obj.stack) { | ||
} else { | ||
for (var key in obj) { | ||
keys = Object.keys(obj) | ||
for (var i = 0; i < keys.length; i++) { | ||
key = keys[i] | ||
value = obj[key] | ||
if (obj.hasOwnProperty(key) && value !== undefined) { | ||
value = this.serializers[key] ? this.serializers[key](value) : value | ||
if (value !== undefined) { | ||
data += ',"' + key + '":' + this.stringify(value) | ||
if (value !== undefined) { | ||
if (this.serializers[key]) { | ||
value = this.serializers[key](value) | ||
if (value === undefined) { | ||
continue | ||
} | ||
} | ||
data += ',"' + key + '":' + this.stringify(value) | ||
} | ||
@@ -254,5 +262,7 @@ } | ||
var key | ||
for (key in bindings) { | ||
var keys = Object.keys(bindings) | ||
for (var i = 0; i < keys.length; i++) { | ||
key = keys[i] | ||
value = bindings[key] | ||
if (key !== 'level' && key !== 'serializers' && bindings.hasOwnProperty(key) && value !== undefined) { | ||
if (key !== 'level' && key !== 'serializers' && value !== undefined) { | ||
value = this.serializers[key] ? this.serializers[key](value) : value | ||
@@ -259,0 +269,0 @@ data += '"' + key + '":' + this.stringify(value) + ',' |
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
582558
2125