()
| 4 | let progressCache: Set<string> | null = null; |
| 5 | |
| 6 | function getProgress(): Set<string> { |
| 7 | if (progressCache) return progressCache; |
| 8 | try { |
| 9 | const raw = localStorage.getItem(STORAGE_KEY); |
| 10 | if (raw) return (progressCache = new Set(JSON.parse(raw))); |
| 11 | } catch { |
| 12 | // ignore |
| 13 | } |
| 14 | return (progressCache = new Set()); |
| 15 | } |
| 16 | |
| 17 | function saveProgress(completed: Set<string>) { |
| 18 | progressCache = completed; |
no outgoing calls
no test coverage detected