buffer-json-stream

Buffer streamin JSON

npm install buffer-json-stream
12 downloads in the last month

buffer-json-stream

Buffer streaming JSON. Readable stream pipes in chunks of JSON, buffer-json-stream pipes out all that JSON buffered into one stream chunk.

Install

npm install buffer-json-stream --save

Usage

Use as a normal Transform stream.


/*
In:

Chunk: { some: 'object' }
Chunk: { someOther: 'object' }

*/

someReadableStream.
  pipe(bufferJsonStream()). // Magic right there
  pipe(process.stdout);

/*
Out:

Chunk: [
  {
    some: 'object'
  },
  {
    someOther: 'object'
  }
]
*/
npm loves you