5 lines
128 B
JavaScript
5 lines
128 B
JavaScript
export default function shortenNumber(num) {
|
|
return Intl.NumberFormat('en-US', {
|
|
notation: 'compact',
|
|
}).format(num);
|
|
}
|