(key: string)
| 69 | } |
| 70 | |
| 71 | export function safeRemove(key: string): void { |
| 72 | try { |
| 73 | globalThis.localStorage.removeItem(key); |
| 74 | } catch { |
| 75 | // ignore |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | export function safeGetJson<T>(key: string): T | null { |
| 80 | const raw = safeGetString(key); |
no test coverage detected