Untitled

 avatar
unknown
javascript
2 months ago
480 B
3
Indexable
const formatNumber = (num: number): string => {
    return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  };


  const metrics = [
    { key: 'premium' as const, label: 'Premium', format: formatNumber },
    { key: 'adequacy' as const, label: 'Adequacy', format: formatPercentage },
    { key: 'rateOnLine' as const, label: 'Rate on Line', format: formatPercentage },
    { key: 'ultimateLossRatio' as const, label: 'Ultimate Loss Ratio', format: formatPercentage }
  ];
Leave a Comment