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
Run following code, will raise an Error: "Unexpected token ILLEGAL" require("vm").runInThisContext("var b = '\u2029' ")
require("vm").runInThisContext("var b = '\u2029' ")
The text was updated successfully, but these errors were encountered:
I guess you have to escape the backslash so it stays as-is in the string passed to runInThisContext
runInThisContext
Sorry, something went wrong.
You could get the same error with simple \n in place of \u2029. That's because they both are line terminators. See good article http://timelessrepo.com/json-isnt-a-javascript-subset
\n
\u2029
Yes. Thanks a lot. This is exactly what I need. And I do think JSON is a subset of javascript. Now I get it, thanks.
Successfully merging a pull request may close this issue.
Run following code, will raise an Error: "Unexpected token ILLEGAL"
require("vm").runInThisContext("var b = '\u2029' ")
The text was updated successfully, but these errors were encountered: