json-stringify-trough

1.0.1 • Public • Published

json-stringify-trough

npm

Known Vulnerabilities

Build Status

Coverage Status

Simply stringify a readable stream in objectMode and get that array as a complete valid JSON at readable side of transform stream.

Usefull if you want to do something like:

  res.set('Content-Type', 'application/json')
  readableObjectStream
    .pipe(new JSONStringifyTrough())
    .pipe(res)
    .on('error', ...)

Saves you 1 buffering in case where you would collect all objects into array and then JSON.stringify all that.

Write simple benchmark code and test different stringifiers

Fun with streams

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i json-stringify-trough

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

6.22 kB

Total Files

7

Last publish

Collaborators

  • big-kahuna-burger