portfolio/lib/numberFormat.ts

5 lines
137 B
TypeScript

export function numberFormat(value: number) {
return new Intl.NumberFormat('en', {
notation: 'compact'
}).format(value)
}