Closed pastak closed 3 years ago
Thanks for providing link to the article As the tests are passing I will just release this soon and let people test it (maybe they won't notice a thing)
@PikachuEXE Oh, it maybe happens problem with JSON contains '
...
Try to create a failing case
We also have an option called json_only
(not well documented)
Introduced in https://github.com/fnando/i18n-js/pull/524
I will hold my release until you figure if single quotes would cause issue after this PR merged
I have become aware json_only
and it keeps the same results as before 👍
JSON.parse
is much faster than object literalBecause the JSON grammar is much simpler than JS's object literal so make it faster about x1.5 on some browser's JS engines, not only V8 with Chrome but also JavaScriptCore with Safari or Chakra with Internet Explorer
cf. https://v8.dev/blog/cost-of-javascript-2019#json
with
pretty_print
optionPretty-printed JSON should be contained into template string to pass
JSON.parse
but Internet Explorer 11 doesn't support template string so it avoid usingJSON.parse
whenpretty_print
option istrue
.