Function
setText
(id: string, text: string)
Source from the content-addressed store, hash-verified
| 11 | const formatInt = (n: number): string => new Intl.NumberFormat(undefined).format(Math.max(0, Math.floor(n))); |
| 12 | |
| 13 | const setText = (id: string, text: string): void => { |
| 14 | const el = document.getElementById(id); |
| 15 | if (!el) return; |
| 16 | el.textContent = text; |
| 17 | }; |
| 18 | |
| 19 | const createZoomyLineData = (count: number): ReadonlyArray<DataPoint> => { |
| 20 | const n = Math.max(2, Math.floor(count)); |
Tested by
no test coverage detected