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 48 forks source link

indent option only is valid when compact is false (!true) #53

Closed caseman72 closed 4 years ago

caseman72 commented 4 years ago

This:

The indent option takes a string value, and defaults to '\t'. When the compact setting is enabled (true), the value of the indent option is used to format the output for arrays and objects.

Should be:

The indent option takes a string value, and defaults to '\t'. When the compact setting is disabled (false), the value of the indent option is used to format the output for arrays and objects.

Link: https://github.com/mathiasbynens/jsesc#indent

mathiasbynens commented 4 years ago

Good catch, thanks! Do you want to submit a pull request?