A JSON pretty-printer for each line in a stream. Useful for JSON logs.
npm install jwalkerjwalker
----
Parses a file stream for JSON and pretty prints it.
Using jwalker on the command line.
```
Usage: index.js
Options:
--input Input file (-- for stdin).
(default: --)
--output
--spaces
(default: )
--passthrough Passthrough non-JSON lines.
(default: disabled)
``
Using jwalker as a transform stream in node.js.
``javascript
const JWalker = require('jwalker');
readStream
.pipe(new JWalker({ / options / }))
.pipe(writeStream);
``
| Name | Type | Description | Default |
|:---------------------|:---------:|:---------------------------------------------|:--------|
| passthroughNonJSON | Boolean | Tells the transform to passthrough non-JSON. | false |spaces
| | Number | The number of spaces used per indentation. | 4` |
See LICENSE.