You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ jsesc --object '{"foo":42}'
{'foo':42}
$ jsesc --object "{'foo':42}"
Unexpected token 'Error: failed to escape.If you think this is a bug in jsesc, please report it:https://github.com/mathiasbynens/jsesc/issues/newStack trace using jsesc@0.4.1:SyntaxError: Unexpected token '
at Object.parse (native)
at /usr/local/share/npm/lib/node_modules/jsesc/bin/jsesc:85:20
at Array.forEach (native)
at main (/usr/local/share/npm/lib/node_modules/jsesc/bin/jsesc:49:11)
at /usr/local/share/npm/lib/node_modules/jsesc/bin/jsesc:110:3
at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/jsesc/bin/jsesc:133:2)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
This is currently by design, since we use JSON.parse(). But maybe we could use something like @espadrine’s localeval instead?
The text was updated successfully, but these errors were encountered:
This is currently by design, since we use
JSON.parse()
. But maybe we could use something like @espadrine’slocaleval
instead?The text was updated successfully, but these errors were encountered: