5 lines
172 B
JavaScript
5 lines
172 B
JavaScript
const { locale } = Intl.NumberFormat().resolvedOptions();
|
|
const shortenNumber = Intl.NumberFormat(locale, {
|
|
notation: 'compact',
|
|
}).format;
|
|
export default shortenNumber;
|