portfolio/lib/numberFormat.ts

5 lines
137 B
TypeScript
Raw Normal View History

2023-01-26 22:07:11 +00:00
export function numberFormat(value: number) {
return new Intl.NumberFormat('en', {
notation: 'compact'
}).format(value)
}