MCPcopy Create free account
hub / github.com/dailydotdev/apps / isLocalStorageEnabled

Function isLocalStorageEnabled

packages/shared/src/lib/storageWrapper.ts:9–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()) {

Callers 4

getItemFunction · 0.85
setItemFunction · 0.85
removeItemFunction · 0.85
clearFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected