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
{{ message }}
Repository navigation
Negative zero treated inconsistently by stringify and parse #638
Expected behaviour
I expect both method to either drop zero sign or to preserve it, or to have an option for this. I prefer preserve to keep parse(stringify(x)) == x.
Activity
eemeli commentedon Sep 13, 2025
Huh, that's a bit surprising. Numbers are serialised with JSON.stringify(), and it does this:
But I agree that we should special-case -0.
fix: Serialize -0 as -0 (fixes eemeli#638)