(key: string, fallbackValue: T)
| 18 | } |
| 19 | |
| 20 | load<T>(key: string, fallbackValue: T) { |
| 21 | const fullKey = `${this.keyPrefix}.${key}`; |
| 22 | try { |
| 23 | const json = localStorage.getItem(fullKey) || ""; |
| 24 | return JSON.parse(json) as T; |
| 25 | } catch { |
| 26 | return fallbackValue; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | remove(key: string) { |
| 31 | const fullKey = `${this.keyPrefix}.${key}`; |
no outgoing calls
no test coverage detected