Shorten shortenNumber code
This commit is contained in:
parent
5fa02f9cc4
commit
4bf6b00b94
|
@ -1,7 +1,5 @@
|
|||
const { locale } = Intl.NumberFormat().resolvedOptions();
|
||||
|
||||
export default function shortenNumber(num) {
|
||||
return Intl.NumberFormat(locale, {
|
||||
notation: 'compact',
|
||||
}).format(num);
|
||||
}
|
||||
const shortenNumber = Intl.NumberFormat(locale, {
|
||||
notation: 'compact',
|
||||
}).format;
|
||||
export default shortenNumber;
|
||||
|
|
Loading…
Reference in a new issue