(name: string)
| 91 | } |
| 92 | |
| 93 | get(name: string): string | null { |
| 94 | if (!this.storage) { |
| 95 | return null; |
| 96 | } |
| 97 | |
| 98 | const key = `${STORAGE_NAMESPACE}:${name}`; |
| 99 | const value = this.storage.getItem(key); |
| 100 | // Clean up any inadvertently saved null/undefined values. |
| 101 | if (value === 'null' || value === 'undefined') { |
| 102 | this.storage.removeItem(key); |
| 103 | return null; |
| 104 | } |
| 105 | |
| 106 | return value || null; |
| 107 | } |
| 108 | |
| 109 | set( |
| 110 | name: string, |
no outgoing calls