Closed Elinia closed 3 years ago
Yes, it intentionally matches the behaviour of toFixed
with primitive numbers:
console.log( (-0.1).toFixed(0) ); // '-0'
console.log( (-0).toFixed(0) ); // '0'
I'll consider supporting negative decimal places here.
Thanks for the kindly reply!
toFormat
provides different results with negative zero, is it an expected behavior?I found this issue when trying to support negative decimal places with something like: