export const numberWithCommas = (number: number): string => { if (number) { return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); } };