File size: 262 Bytes
0c20ea8
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
export function replaceCommaWithPeriod(input: string): string {
  return input.replace(/,/g, ".");
}

export function formatNumber(number: number): string {
  return replaceCommaWithPeriod(
    number.toLocaleString("en-US", { maximumFractionDigits: 0 })
  );
}