Formats a JSON stream to make it more readable by adding proper indentation and newlines.
npm install format-json-stream
Formats a JSON stream to make it more readable by adding proper indentation and newlines.
``shdefault indent 2
curl https://raw.github.com/thlorenz/format-json-stream/master/package.json | format-json-stream | head -n 20
As Library
`js
var format = require('format-json-stream')// formats with indent 2
process.stdin.pipe(format()).pipe(process.stdout);
// formats with indent 4
process.stdin.pipe(format(4)).pipe(process.stdout);
``npm install format-json-stream
# or as cli tool
npm install -g format-json-stream