async-json-writer
Advanced tools
Comparing version
@@ -22,2 +22,9 @@ 'use strict'; | ||
this._debug('_writeTarget'); | ||
if (_.isUndefined(target)) { | ||
return; | ||
} | ||
if (_.isNull(target)) { | ||
yield* this._write('null'); | ||
return; | ||
} | ||
if (_.isArray(target)) { | ||
@@ -60,5 +67,8 @@ yield* this._writeArray(target); | ||
const name = names[i]; | ||
const subTarget = target[name]; | ||
if (_.isUndefined(subTarget)) { | ||
continue; | ||
} | ||
yield* this._writeString(name); | ||
yield* this._write(':'); | ||
const subTarget = target[name]; | ||
yield* this._writeTarget(subTarget); | ||
@@ -65,0 +75,0 @@ } |
{ | ||
"name": "async-json-writer", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Writes huge JSONs to stream with minimum memory usage", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3515
4.83%97
11.49%