(n)
| 82 | |
| 83 | /** Stat-tile values: 1,284 stays exact; 12,900 becomes 12.9K. */ |
| 84 | export function compact(n) { |
| 85 | if (n === null || n === undefined || Number.isNaN(n)) return '—'; |
| 86 | return Math.abs(n) >= 10_000 ? COMPACT.format(n) : PLAIN.format(n); |
| 87 | } |
| 88 | |
| 89 | export function number(n) { |
| 90 | if (n === null || n === undefined || Number.isNaN(n)) return '—'; |