| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e7b7d72 commit e54b433
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -598,9 +598,8 @@ function formatValue(ctx, value, recurseTimes) { | |||
| 598 | 598 | ||
| 599 | 599 | ||
| 600 | 600 | function formatNumber(ctx, value) { | |
| 601 | - // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, | ||
| 602 | - // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . | ||
| 603 | - if (value === 0 && 1 / value < 0) | ||
| 601 | + // Format -0 as '-0'. Strict equality won't distinguish 0 from -0. | ||
| 602 | + if (Object.is(value, -0)) | ||
| 604 | 603 | return ctx.stylize('-0', 'number'); | |
| 605 | 604 | return ctx.stylize('' + value, 'number'); | |
| 606 | 605 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments