streaming-json-stringify
Advanced tools
Comparing version 2.1.0 to 2.2.0
15
index.js
@@ -27,2 +27,12 @@ | ||
this._writableState.objectMode = true | ||
// Array Deliminator defaults | ||
var open = options && options.open ? options.open : '[\n' | ||
var seperator = options && options.seperator ? options.seperator : '\n,\n' | ||
var close = options && options.close ? options.close : '\n]\n' | ||
// Array Deliminators | ||
this.open = new Buffer(open, 'utf8') | ||
this.seperator = new Buffer(seperator, 'utf8') | ||
this.close = new Buffer(close, 'utf8') | ||
} | ||
@@ -33,7 +43,2 @@ | ||
// Array delimiters | ||
Stringify.prototype.open = new Buffer('[\n', 'utf8') | ||
Stringify.prototype.seperator = new Buffer('\n,\n', 'utf8') | ||
Stringify.prototype.close = new Buffer('\n]\n', 'utf8') | ||
// JSON.stringify options | ||
@@ -40,0 +45,0 @@ Stringify.prototype.replacer = null |
{ | ||
"name": "streaming-json-stringify", | ||
"description": "Streaming JSON.stringify()", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", | ||
@@ -28,4 +28,4 @@ "repository": "stream-utils/streaming-json-stringify", | ||
"json-stringify-safe": "5", | ||
"readable-stream": "1" | ||
"readable-stream": "2" | ||
} | ||
} |
@@ -9,3 +9,2 @@ # Streaming JSON.stringify() | ||
[![Downloads][downloads-image]][downloads-url] | ||
[![Gittip][gittip-image]][gittip-url] | ||
@@ -82,3 +81,1 @@ Similar to [JSONStream.stringify()](https://github.com/dominictarr/JSONStream#jsonstreamstringifyopen-sep-close) except it is, by default, a binary stream, and it is a streams2 implementation. | ||
[downloads-url]: https://npmjs.org/package/streaming-json-stringify | ||
[gittip-image]: https://img.shields.io/gratipay/jonathanong.svg?style=flat-square | ||
[gittip-url]: https://gratipay.com/jonathanong/ |
6139
50
80
+ Addedisarray@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedisarray@0.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedstring_decoder@0.10.31(transitive)
Updatedreadable-stream@2