Closed mathiasbynens closed 11 years ago
This would be like JSON.stringify(string) except it would actually escape non-ASCII symbols using only the escape sequences supported by JSON.
JSON.stringify(string)
Better (?) idea: we could just overload the stringEscape function so stringEscape(object) acts different than stringEscape(string).
stringEscape
stringEscape(object)
stringEscape(string)
There now is a json option, but it only supports strings, flat objects containing only string values, or flat arrays containing only string values. So far this has been good enough for what I need for he.
json
This would be like
JSON.stringify(string)
except it would actually escape non-ASCII symbols using only the escape sequences supported by JSON.Better (?) idea: we could just overload the
stringEscape
function sostringEscape(object)
acts different thanstringEscape(string)
.