-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Format issue with average #546
Comments
@all-contributors please add @Isha-Sharma for bug |
I've put up a pull request to add @Isha-Sharma! 🎉 |
Fixed in |
Thanks @BenjaminVanRyseghem for the prompt response :) |
in numbro 2.3.0 |
I changed a bit the interface to prevent losing a feature. Often, when formatting currency, it's convenient to have more info, hence formatting To allow such a behavior, I introduced
|
But when numbro(999999).format({average:true, lowPrecision: false}); // "1000k"
numbro(999999).format({average:true, lowPrecision: true}); // "1m"
numbro(999999).format({average:true}); // "1m"
numbro(999999).format({average:true, output: 'currency'}); // "$1000k" |
I think this was a breaking change; I get format errors now whenever using |
Input: 999999
Format: {average: true}
Output: 1000k
Expected Output: 1m
Likewise, it's happening for all the corner cases.
Appreciate if someone could help me with this.
The text was updated successfully, but these errors were encountered: