mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 06:26:59 +00:00
add formatting to gold display
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
const formatter = new Intl.NumberFormat('en-US', {
|
||||
maximumFractionDigits: 3,
|
||||
// @ts-ignore - typescript doesn't know about this option for some godforsaken reason
|
||||
notation: "compact",
|
||||
useGrouping: true,
|
||||
});
|
||||
|
||||
export default function formatGold(number: number): string {
|
||||
return formatter.format(number);
|
||||
}
|
||||
Reference in New Issue
Block a user