dbeaver/pro#8687 fix(formatNumber): fix unit selection for floats and…#4276
Open
SychevAndrey wants to merge 3 commits intodevelfrom
Open
dbeaver/pro#8687 fix(formatNumber): fix unit selection for floats and…#4276SychevAndrey wants to merge 3 commits intodevelfrom
SychevAndrey wants to merge 3 commits intodevelfrom
Conversation
… 6-digit numbers; use precision param below 1000 - Use Math.log10 instead of toString().length to count integer digits — toString() on a float like 4036.29 has length 7, which incorrectly bucketed thousands-range values into millions - Fix exponent formula for 3n-digit numbers (e.g. 100000 gave exponent=6→M instead of 3→k) - Apply precision param d below 1000 (was hardcoded 2); default to 2 - Add formatNumber.test.ts
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 20 |
TIP This summary will be updated as you push new changes. Give us feedback
Wroud
approved these changes
Apr 9, 2026
devnaumov
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… 6-digit numbers; use precision param below 1000