mathiasbynens / jsesc

Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.
https://mths.be/jsesc
MIT License
716 stars 53 forks source link

Tweak `--pretty` / `compact:false` #8

Closed mathiasbynens closed 11 years ago

mathiasbynens commented 11 years ago
$ jsesc --pretty '[]'
[

]

$ jsesc --pretty '{}'
{

}

Avoid adding the \n\n to the output for empty objects or arrays.