json-stream-stringify
Advanced tools
Comparing version 1.3.4 to 1.3.5
{ | ||
"name": "json-stream-stringify", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "JSON.Stringify as a readable stream", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -15,3 +15,3 @@ 'use strict'; | ||
}]; | ||
this.obj = this._shouldIterate(obj) ? Array.isArray(obj) ? obj.slice(0) : Object.assign({}, obj) : obj; | ||
this.obj = this._shouldIterate(obj) ? (Array.isArray(obj) ? obj.slice(0) : Object.assign({}, obj)) : obj; | ||
this.replacerIsArray = Array.isArray(replacer); | ||
@@ -79,2 +79,6 @@ this.replacer = replacer instanceof Function || this.replacerIsArray ? replacer : undefined; | ||
if(state === 'value') { | ||
if (typeof val === 'function') { | ||
return ctx.next(); | ||
} | ||
if (this.replacer && !this.replacerIsArray) { | ||
@@ -81,0 +85,0 @@ val = this.replacer(key, val); |
@@ -72,2 +72,6 @@ 'use strict'; | ||
it('{a:function(){}} should be {}', createTest({ | ||
a: function(){} | ||
}, '{}')); | ||
it('{a:date} should be {"a":date.toJSON()}', createTest({ | ||
@@ -74,0 +78,0 @@ a: date |
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
21076
359