Skip to content

fix: improve labeledNumber formatting - handle edge cases, avoid mutation#264

Open
liuyikai1103 wants to merge 1 commit into
capofficial:mainfrom
liuyikai1103:fix/labeled-number-format
Open

fix: improve labeledNumber formatting - handle edge cases, avoid mutation#264
liuyikai1103 wants to merge 1 commit into
capofficial:mainfrom
liuyikai1103:fix/labeled-number-format

Conversation

@liuyikai1103

Copy link
Copy Markdown

Fixes #11

Changes

  1. Avoid mutation: uses local absNum instead of modifying input
  2. Handle negative numbers: correctly preserves the sign
  3. Handle 0 and undefined: returns proper values
  4. Cleaner format: no trailing .0 for round numbers (e.g. 1K not 1.0K)

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.

Size to close is not well formatted, sometimes

1 participant