Shorten shortenNumber code

This commit is contained in:
Lim Chee Aun 2023-07-23 14:09:39 +08:00
parent 5fa02f9cc4
commit 4bf6b00b94

View file

@ -1,7 +1,5 @@
const { locale } = Intl.NumberFormat().resolvedOptions(); const { locale } = Intl.NumberFormat().resolvedOptions();
const shortenNumber = Intl.NumberFormat(locale, {
export default function shortenNumber(num) { notation: 'compact',
return Intl.NumberFormat(locale, { }).format;
notation: 'compact', export default shortenNumber;
}).format(num);
}