add formatting to gold display

This commit is contained in:
2023-04-02 21:54:11 +02:00
parent eb4b0fba00
commit 56407505ea
5 changed files with 19 additions and 4 deletions
+10
View File
@@ -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);
}