Display normal number up to 9999
I find 1.15K to be extremely hard to read and it takes the same amount of characters as 1150.
This commit is contained in:
parent
934cabcec4
commit
bb3d386e4a
1 changed files with 3 additions and 0 deletions
|
@ -6,5 +6,8 @@ const SHORTNUM_SI_FORMAT = new Intl.NumberFormat("en-US", {
|
|||
});
|
||||
|
||||
export default function numToSI(value: number): string {
|
||||
if (value < 10000) {
|
||||
return value.toString()
|
||||
}
|
||||
return SHORTNUM_SI_FORMAT.format(value);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue