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