CLI interface for json-stringify-pretty-compact library
npm install json-stringify-pretty-compact-cliA CLI wrapper around the json-stringify-pretty-compact-cli library.
Thanks and acknowledgements to Simon Lydell for creating this wonderful library.
Turns ugly JSON like:
``json`
{
"bool": true,
"short array": [
1,
2,
3
],
"long array": [
{
"x": 1,
"y": 2
},
{
"x": 2,
"y": 1
},
{
"x": 1,
"y": 1
},
{
"x": 2,
"y": 2
}
]
}
into:
`json`
{
"bool": true,
"short array": [1, 2, 3],
"long array": [
{"x": 1, "y": 2},
{"x": 2, "y": 1},
{"x": 1, "y": 1},
{"x": 2, "y": 2}
]
}
``
npm install json-stringify-pretty-compact-cli
`shell``
json-spc [--indent=
- indent: Defaults to 2. Works exactly like the third parameter of JSON.stringify.
- max-length: Defaults to 80. Lines will be tried to be kept at maximum this many characters long.
MIT.