4
front/src/utils/formatNumber.ts
Normal file
4
front/src/utils/formatNumber.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export function formatNumber(value: number) {
|
||||
// Formats the value to a string and add commas to it ex: 50,000 | 500,000
|
||||
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
}
|
||||
Reference in New Issue
Block a user