-
-
Notifications
You must be signed in to change notification settings - Fork 388
Replace human-number with Intl.NumberFormat #397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…rFormat Co-authored-by: electerious <499088+electerious@users.noreply.github.com>
Co-authored-by: electerious <499088+electerious@users.noreply.github.com>
|
@copilot Remove test/utils/formatCompactNumber.js and src/utils/formatCompactNumber.js |
Co-authored-by: electerious <499088+electerious@users.noreply.github.com>
Removed both files in commit 62a5203. The UI utility in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Replaces the
human-numberdependency with nativeIntl.NumberFormatAPI using compact notation for number formatting with SI prefixes (K, M, B, T).Changes
New utility: Created
formatCompactNumber(num, maximumFractionDigits)in UI utils (src/ui/scripts/utils/)Intl.NumberFormatwithnotation: 'compact'andcompactDisplay: 'short'maximumFractionDigitsparameterSimplified formatters: Refactored
formatNumber.jsandformatFloat.jsto delegate to the shared utilityDependencies: Removed
human-numberfrom package.jsonExample
Output remains consistent:
1500 → "1.5K",1000000 → "1M",1500000000 → "1.5B"> [!WARNING]
>
>
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.