{"_id":"streaming-json-stringify","_rev":"333445","name":"streaming-json-stringify","description":"Streaming JSON.stringify()","dist-tags":{"latest":"3.1.0"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"time":{"modified":"2021-06-08T13:12:17.000Z","created":"2013-09-20T10:37:07.453Z","3.1.0":"2015-10-29T16:33:18.386Z","3.0.0":"2015-10-23T17:01:29.317Z","2.2.0":"2015-07-15T01:05:42.066Z","2.1.0":"2015-02-09T18:12:21.207Z","2.0.0":"2014-12-26T07:33:37.292Z","1.0.1":"2014-12-07T04:27:35.317Z","1.0.0":"2013-11-30T01:28:37.120Z","0.2.2":"2013-10-10T18:55:49.473Z","0.2.1":"2013-09-27T20:31:44.323Z","0.2.0":"2013-09-20T10:37:07.453Z"},"users":{"tunnckocore":true},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"git+https://github.com/stream-utils/streaming-json-stringify.git"},"versions":{"3.1.0":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"3.1.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"git+https://github.com/stream-utils/streaming-json-stringify.git"},"license":"MIT","devDependencies":{"cat-stream":"*","istanbul":"0","mocha":"2","sinon":"^1.17.2"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["stream","json","stringify"],"files":["index.js"],"dependencies":{"json-stringify-safe":"5","readable-stream":"2"},"gitHead":"cffa62011dfd2f4c13654bbdbc5c273b13142435","bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues"},"homepage":"https://github.com/stream-utils/streaming-json-stringify#readme","_id":"streaming-json-stringify@3.1.0","_shasum":"80200437a993cc39c4fe00263b7b3b903ac87af5","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"80200437a993cc39c4fe00263b7b3b903ac87af5","size":2735,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-3.1.0.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{},"publish_time":1446136398386,"_cnpm_publish_time":1446136398386,"_hasShrinkwrap":false},"3.0.0":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"3.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"git+https://github.com/stream-utils/streaming-json-stringify.git"},"license":"MIT","devDependencies":{"mocha":"2","istanbul":"0","cat-stream":"*"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["stream","json","stringify"],"files":["index.js"],"dependencies":{"json-stringify-safe":"5","readable-stream":"2"},"gitHead":"e8bcf656c022be9bbfc44d8a39b0a5dd151f648b","bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues"},"homepage":"https://github.com/stream-utils/streaming-json-stringify#readme","_id":"streaming-json-stringify@3.0.0","_shasum":"56af87c57e4653d3d790560a42729947a2042b29","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"56af87c57e4653d3d790560a42729947a2042b29","size":2611,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-3.0.0.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{},"publish_time":1445619689317,"_cnpm_publish_time":1445619689317,"_hasShrinkwrap":false},"2.2.0":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"2.2.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"git+https://github.com/stream-utils/streaming-json-stringify.git"},"license":"MIT","devDependencies":{"mocha":"2","istanbul":"0","cat-stream":"*"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["stream","json","stringify"],"files":["index.js"],"dependencies":{"json-stringify-safe":"5","readable-stream":"2"},"gitHead":"3ea4331a80160d4d11c9ff7c162c6ed82b6b5278","bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues"},"homepage":"https://github.com/stream-utils/streaming-json-stringify#readme","_id":"streaming-json-stringify@2.2.0","_shasum":"c78346376a24b4c07e2e0aa0cc87101340ac186c","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"dist":{"shasum":"c78346376a24b4c07e2e0aa0cc87101340ac186c","size":2598,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-2.2.0.tgz"},"directories":{},"publish_time":1436922342066,"_cnpm_publish_time":1436922342066,"_hasShrinkwrap":false},"2.1.0":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"2.1.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/stream-utils/streaming-json-stringify"},"license":"MIT","devDependencies":{"mocha":"2","istanbul":"0","cat-stream":"*"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["stream","json","stringify"],"files":["index.js"],"dependencies":{"json-stringify-safe":"5","readable-stream":"1"},"gitHead":"e372df647e70ca204f6a706ac1e0d18597cda373","bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues"},"homepage":"https://github.com/stream-utils/streaming-json-stringify","_id":"streaming-json-stringify@2.1.0","_shasum":"b2c2c23f579e0fc4eca18293f91fa4f335655820","_from":".","_npmVersion":"2.4.1","_nodeVersion":"1.1.0","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"dist":{"shasum":"b2c2c23f579e0fc4eca18293f91fa4f335655820","size":2585,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-2.1.0.tgz"},"directories":{},"publish_time":1423505541207,"_cnpm_publish_time":1423505541207,"_hasShrinkwrap":false},"2.0.0":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"2.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/stream-utils/streaming-json-stringify"},"license":"MIT","devDependencies":{"mocha":"2","istanbul":"0","cat-stream":"*"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["stream","json","stringify"],"files":["index.js"],"dependencies":{"json-stringify-safe":"5","readable-stream":"1"},"gitHead":"c5feca9609ea7d9fcd4e98e385d39931aa2bfe7b","bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues"},"homepage":"https://github.com/stream-utils/streaming-json-stringify","_id":"streaming-json-stringify@2.0.0","_shasum":"773a0857131e48e1a3cac4868116f0631ba14290","_from":".","_npmVersion":"2.1.12","_nodeVersion":"0.11.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"dist":{"shasum":"773a0857131e48e1a3cac4868116f0631ba14290","size":2554,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-2.0.0.tgz"},"directories":{},"publish_time":1419579217292,"_cnpm_publish_time":1419579217292,"_hasShrinkwrap":false},"1.0.1":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"1.0.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/stream-utils/streaming-json-stringify"},"license":"MIT","devDependencies":{"mocha":"2","istanbul":"0","cat-stream":"*"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["stream","json","stringify"],"files":["index.js"],"gitHead":"1111b1e7a26efe8f3885b3e2bc2ff938d47932d6","bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues"},"homepage":"https://github.com/stream-utils/streaming-json-stringify","_id":"streaming-json-stringify@1.0.1","_shasum":"6b7ab43d7766035170c9a2a96c6cc143764a4ebd","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.11.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"dist":{"shasum":"6b7ab43d7766035170c9a2a96c6cc143764a4ebd","size":2570,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-1.0.1.tgz"},"directories":{},"publish_time":1417926455317,"_cnpm_publish_time":1417926455317,"_hasShrinkwrap":false},"1.0.0":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"1.0.0","scripts":{"test":"make test"},"devDependencies":{"mocha":"*","cat-stream":"*"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/stream-utils/streaming-json-stringify.git"},"bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues","email":"me@jongleberry.com"},"license":"MIT","engines":{"node":">= 0.10"},"readmeFilename":"README.md","homepage":"https://github.com/stream-utils/streaming-json-stringify","_id":"streaming-json-stringify@1.0.0","dist":{"shasum":"3bbd80b8eb2bdc08c2940169bb78edc42aaace1a","size":2364,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{},"publish_time":1385774917120,"_cnpm_publish_time":1385774917120,"_hasShrinkwrap":false},"0.2.2":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"0.2.2","scripts":{"test":"make test"},"devDependencies":{"mocha":"*","cat-stream":"*"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/stream-utils/streaming-json-stringify.git"},"bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues","email":"me@jongleberry.com"},"license":"MIT","engines":{"node":">= 0.10"},"readmeFilename":"README.md","_id":"streaming-json-stringify@0.2.2","dist":{"shasum":"cda9cb61537b8b22c6a999593a1c77ce5717e260","size":2389,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{},"publish_time":1381431349473,"_cnpm_publish_time":1381431349473,"_hasShrinkwrap":false},"0.2.1":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"0.2.1","scripts":{"test":"make test"},"devDependencies":{"mocha":"*","cat-stream":"*"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/streaming-json-stringify.git"},"bugs":{"url":"https://github.com/jonathanong/streaming-json-stringify/issues","email":"me@jongleberry.com"},"license":"MIT","engines":{"node":">= 0.10"},"readmeFilename":"README.md","_id":"streaming-json-stringify@0.2.1","dist":{"shasum":"4825def2a908c3bdba8bfae11bf8666522e1f32a","size":2383,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{},"publish_time":1380313904323,"_cnpm_publish_time":1380313904323,"_hasShrinkwrap":false},"0.2.0":{"name":"streaming-json-stringify","description":"Streaming JSON.stringify()","version":"0.2.0","scripts":{"test":"make test"},"devDependencies":{"mocha":"*","cat-stream":"*"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/streaming-json-stringify.git"},"bugs":{"url":"https://github.com/jonathanong/streaming-json-stringify/issues","email":"me@jongleberry.com"},"license":"MIT","engines":{"node":">= 0.10"},"readmeFilename":"README.md","_id":"streaming-json-stringify@0.2.0","dist":{"shasum":"b74b471e7cec7d8228c9edeb5e525a6a6e5ed564","size":2378,"noattachment":false,"key":"/streaming-json-stringify/-/streaming-json-stringify-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streaming-json-stringify/download/streaming-json-stringify-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{},"publish_time":1379673427453,"_cnpm_publish_time":1379673427453,"_hasShrinkwrap":false}},"readme":"# Streaming JSON.stringify()\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\nSimilar 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.\n\n## Example\n\nThe main use case for this is to stream a database query to a web client.\nThis is meant to be used only with arrays, not objects.\n\n```js\nvar Stringify = require('streaming-json-stringify')\n\napp.get('/things', function (req, res, next) {\n  res.setHeader('Content-Type', 'application/json; charset=utf-8')\n\n  db.things.find()\n  .stream()\n  .pipe(Stringify())\n  .pipe(res)\n})\n```\n\nwill yield something like\n\n```json\n[\n{\"_id\":\"123412341234123412341234\"}\n,\n{\"_id\":\"123412341234123412341234\"}\n]\n\n```\n\n## Separators\n\n* The stream always starts with `'[\\n'`.\n* Documents are separated by `'\\n,\\n'`.\n* The stream is terminated with `'\\n]\\n'`.\n\n## Stringifier\n\nBy default, [json-stringify-safe](https://www.npmjs.com/package/json-stringify-safe) is used to convert objects into strings. This can be configured with `options.stringifier`.\n\n## API\n\n### Stringify([options])\n\nReturns a `Transform` stream.\nThe options are passed to the `Transform` constructor.\n\n### JSON.stringify options\n\nYou can override these:\n\n```js\nvar stringify = Stringify()\nstringify.replacer = function () {}\nstringify.space = 2\nstringify.opener = '['\nstringify.seperator = ','\nstringify.closer = ']'\nstringify.stringifier = JSON.stringify\n```\n\n[gitter-image]: https://badges.gitter.im/stream-utils/streaming-json-stringify.png\n[gitter-url]: https://gitter.im/stream-utils/streaming-json-stringify\n[npm-image]: https://img.shields.io/npm/v/streaming-json-stringify.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/streaming-json-stringify\n[github-tag]: http://img.shields.io/github/tag/stream-utils/streaming-json-stringify.svg?style=flat-square\n[github-url]: https://github.com/stream-utils/streaming-json-stringify/tags\n[travis-image]: https://img.shields.io/travis/stream-utils/streaming-json-stringify.svg?style=flat-square\n[travis-url]: https://travis-ci.org/stream-utils/streaming-json-stringify\n[coveralls-image]: https://img.shields.io/coveralls/stream-utils/streaming-json-stringify.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/stream-utils/streaming-json-stringify\n[david-image]: http://img.shields.io/david/stream-utils/streaming-json-stringify.svg?style=flat-square\n[david-url]: https://david-dm.org/stream-utils/streaming-json-stringify\n[license-image]: http://img.shields.io/npm/l/streaming-json-stringify.svg?style=flat-square\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/streaming-json-stringify.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/streaming-json-stringify\n","_attachments":{},"homepage":"https://github.com/stream-utils/streaming-json-stringify#readme","bugs":{"url":"https://github.com/stream-utils/streaming-json-stringify/issues"},"license":"MIT"}