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

Add option to whitelist certain characters #50

Closed spik3r closed 5 years ago

spik3r commented 5 years ago

Would be nice to add an option to whitelist certain characters you don't want escaped for example: 'whitelist': 'äöüß' so jsesc ignores these but escapes everything else.

spik3r commented 5 years ago

Implemented changes in the following fork since this project doesn't seem to be maintained anymore: https://www.npmjs.com/package/js-char-escape