(key: string)
| 8 | } |
| 9 | |
| 10 | get(key: string) { |
| 11 | try { |
| 12 | const value = window[`${this.type}Storage`].getItem(key); |
| 13 | if (value && value.startsWith('{') && value?.endsWith('}')) { |
| 14 | return JSON.parse(value); |
| 15 | } |
| 16 | return value; |
| 17 | } catch (exception) { |
| 18 | return null; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | set(key: string, input: string | object) { |
| 23 | try { |
no outgoing calls
no test coverage detected