(id: string, text: string)
| 41 | }; |
| 42 | |
| 43 | const setText = (id: string, text: string): void => { |
| 44 | const el = document.getElementById(id); |
| 45 | if (!el) return; |
| 46 | el.textContent = text; |
| 47 | }; |
| 48 | |
| 49 | const formatInt = (n: number): string => |
| 50 | new Intl.NumberFormat(undefined).format(Math.max(0, Math.floor(n))); |