(value)
| 696 | } |
| 697 | |
| 698 | function formatPercent(value) { |
| 699 | if (value === null || value === undefined || !Number.isFinite(value)) return "n/a"; |
| 700 | const pct = value * 100; |
| 701 | const sign = pct >= 0 ? "+" : ""; |
| 702 | return `${sign}${pct.toFixed(2)}%`; |
| 703 | } |
| 704 | |
| 705 | function formatDelta(delta, deltaPct) { |
| 706 | if (delta === null || delta === undefined) return "n/a"; |