json-buffer
Advanced tools
Comparing version 2.0.7 to 2.0.8
10
index.js
@@ -22,7 +22,11 @@ var bops = require('bops') | ||
var isFunction = 'function' == typeof o[k] | ||
if(Object.hasOwnProperty.call(o, k) && o[k] !== void(0) && !isFunction) { | ||
if(Object.hasOwnProperty.call(o, k) && !isFunction) { | ||
if(!first) | ||
s += ',' | ||
first = false | ||
s += array ? stringify(o[k]) : stringify(k) + ':' + stringify(o[k]) | ||
if (array) { | ||
s += stringify(o[k]) | ||
} else if (o[k] !== void(0)) { | ||
s += stringify(k) + ':' + stringify(o[k]) | ||
} | ||
} | ||
@@ -36,2 +40,4 @@ } | ||
return JSON.stringify(/^:/.test(o) ? ':' + o : o) | ||
} else if ('undefined' === typeof o) { | ||
return 'null'; | ||
} else | ||
@@ -38,0 +44,0 @@ return JSON.stringify(o) |
{ | ||
"name": "json-buffer", | ||
"description": "JSON parse & stringify that supports binary via bops & base64", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"homepage": "https://github.com/dominictarr/json-buffer", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -35,2 +35,5 @@ | ||
}, | ||
undefinedArray: { | ||
array: [undefined, 1, 'two'] | ||
}, | ||
fn: { | ||
@@ -37,0 +40,0 @@ fn: function () {} |
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
5150
95