json-stream-stringify
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -158,2 +158,7 @@ 'use strict'; | ||
return new Promise((resolve, reject) => { | ||
if (stream.readableEnded) { | ||
resolve(null); | ||
return; | ||
} | ||
const endListener = () => resolve(null); | ||
@@ -427,7 +432,10 @@ | ||
if (read) return; | ||
read = true; | ||
input.then(v => that.setItem(v, parent, key), err => { | ||
try { | ||
read = true; | ||
that.setItem(await input, parent, key); | ||
} catch (err) { | ||
that.emit('error', err); | ||
that.destroy(); | ||
}); | ||
} | ||
} | ||
@@ -434,0 +442,0 @@ |
@@ -155,2 +155,7 @@ 'use strict'; | ||
return new Promise((resolve, reject) => { | ||
if (stream.readableEnded) { | ||
resolve(null); | ||
return; | ||
} | ||
const endListener = () => resolve(null); | ||
@@ -424,7 +429,10 @@ | ||
if (read) return; | ||
read = true; | ||
input.then(v => that.setItem(v, parent, key), err => { | ||
try { | ||
read = true; | ||
that.setItem(await input, parent, key); | ||
} catch (err) { | ||
that.emit('error', err); | ||
that.destroy(); | ||
}); | ||
} | ||
} | ||
@@ -431,0 +439,0 @@ |
@@ -158,2 +158,7 @@ (function (global, factory) { | ||
return new Promise((resolve, reject) => { | ||
if (stream.readableEnded) { | ||
resolve(null); | ||
return; | ||
} | ||
const endListener = () => resolve(null); | ||
@@ -427,7 +432,10 @@ | ||
if (read) return; | ||
read = true; | ||
input.then(v => that.setItem(v, parent, key), err => { | ||
try { | ||
read = true; | ||
that.setItem(await input, parent, key); | ||
} catch (err) { | ||
that.emit('error', err); | ||
that.destroy(); | ||
}); | ||
} | ||
} | ||
@@ -434,0 +442,0 @@ |
@@ -147,2 +147,7 @@ (function (global, factory) { | ||
return new Promise((resolve, reject) => { | ||
if (stream.readableEnded) { | ||
resolve(null); | ||
return; | ||
} | ||
const endListener = () => resolve(null); | ||
@@ -416,7 +421,10 @@ | ||
if (read) return; | ||
read = true; | ||
input.then(v => that.setItem(v, parent, key), err => { | ||
try { | ||
read = true; | ||
that.setItem(await input, parent, key); | ||
} catch (err) { | ||
that.emit('error', err); | ||
that.destroy(); | ||
}); | ||
} | ||
} | ||
@@ -423,0 +431,0 @@ |
{ | ||
"name": "json-stream-stringify", | ||
"description": "JSON.Stringify as a readable stream", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Faleij <faleij@gmail.com> (https://github.com/faleij)", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
345815
2949