export const formatNumber = (value: number | string) => {
    const num = typeof value === 'string' ? parseInt(value.replace(/\D/g, '')) : value;
    if (isNaN(num)) return '';
    return num.toLocaleString('en-US');
};

export const parseNumber = (formatted: string) => {
    const onlyNums = formatted.replace(/\D/g, '');
    return parseInt(onlyNums || '0');
};
