Skip to content

Handle non-finite values in compact number formatting - #9

Merged
ayushdoesdev merged 2 commits into
mainfrom
fix/finite-number-formatting
Nov 8, 2026
Merged

ayushdoesdev merged 2 commits into
mainfrom
fix/finite-number-formatting

Conversation

@ayushdoesdev

Copy link
Copy Markdown
Owner

Summary

  • Return the existing em-dash fallback for NaN, Infinity, and -Infinity in formatNumber.
  • Add focused tests for finite positive, zero, negative, null, undefined, and non-finite values.

Compatibility

  • Finite values keep the existing Intl.NumberFormat("en-US", { notation: "compact" }) behavior.
  • Only non-finite inputs change from browser-dependent formatted output to the existing missing-value placeholder.
  • No scanner, API, database, dependency parsing, or existing open-issue scope is touched.

Validation

  • CI is required before merge.

@ayushdoesdev
ayushdoesdev merged commit 90aeb7e into main Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant