We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsesc(data, { json: true })
JSON.stringify(data)
For example, jsesc doesn’t skip undefined properties, and it doesn’t make use of toJSON:
undefined
toJSON
var obj = { 'toJSON': function() { return 'wat'; } }; var x = { 'lol': obj }; console.log([ JSON.stringify(x), jsesc(x, { 'json': true }) ]);
The text was updated successfully, but these errors were encountered:
Fix Issue mathiasbynens#17: "remove differences between `jsesc(data, …
63a081d
…{ json: true })` and `JSON.stringify(data)"
d652c4f
506dc7d
Add support for toJSON
fb76b46
This brings `jsesc(data, { 'json': true })` closer to `JSON.stringify(data)`. Fixes #17.
jsesc still doesn’t skip undefined properties.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
For example, jsesc doesn’t skip
undefined
properties, and it doesn’t make use oftoJSON
:The text was updated successfully, but these errors were encountered: