Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

big-kahuna-burger/json-stringify-trough

Repository files navigation

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

About

Transform readable objectMode streams into valid JSON

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •