json-stream-stringify
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -60,3 +60,3 @@ 'use strict'; | ||
let stream = new JSONStreamify(data); | ||
stream._iter._forcedCtxType = Array; | ||
stream._iter._parentCtxType = Array; | ||
stream.once('end', () => next(null, undefined)).pipe(pass, { | ||
@@ -63,0 +63,0 @@ end: false |
{ | ||
"name": "json-stream-stringify", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "JSON.Stringify as a readable stream", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -92,3 +92,3 @@ 'use strict'; | ||
if (ctx.type !== Array) { | ||
if ((this._parentCtxType ? this._parentCtxType !== Array : true) && ctx.type !== Array) { | ||
return ctx.next(); | ||
@@ -95,0 +95,0 @@ } |
@@ -106,2 +106,4 @@ 'use strict'; | ||
it(`ReadableStream({}, 'a', undefined, 'c') should be [{},"a",null,"c"]`, createTest(ReadableStream({}, 'a', undefined, 'c'), '[{},"a",null,"c"]')); | ||
it(`{ a: ReadableStream({name: 'name', date: date }) } should be [{},"a",null,"c"]`, createTest({ a: ReadableStream({name: 'name', date: date }) }, `{"a":[{"name":"name","date":"${date.toJSON()}"}]}`)); | ||
}); |
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
20154
335