Untitled
unknown
javascript
a year ago
480 B
7
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 }
];
Editor is loading...
Leave a Comment