Skip to content

Commit

Permalink
Closes #238
Browse files Browse the repository at this point in the history
  • Loading branch information
easafe committed Aug 6, 2024
1 parent 1574ea1 commit 763360b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Shared/Intl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
let kmbFormater = new Intl.NumberFormat('en', {
maximumFractionDigits: 1,
notation: 'compact'
});

export function thousands(number) {
return number.toLocaleString('en-US', {
maximumFractionDigits: 1,
notation: 'compact',
compactDisplay: 'short'
});
return kmbFormater.format(number);
}

0 comments on commit 763360b

Please sign in to comment.