()
| 7 | const inMemoryStorage: { [key: string]: string } = {}; |
| 8 | |
| 9 | function isLocalStorageEnabled() { |
| 10 | try { |
| 11 | return 'localStorage' in window && window.localStorage !== null; |
| 12 | } catch (e) { |
| 13 | return false; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | function getItem(key: string): string | null { |
| 18 | if (isLocalStorageEnabled()) { |
no outgoing calls
no test coverage detected