MCPcopy Index your code
hub / github.com/MALSync/MALSync / checkLocalStorageIsAvailable

Function checkLocalStorageIsAvailable

src/utils/localStore.ts:25–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23export const localStore = store;
24
25function checkLocalStorageIsAvailable() {
26 if (typeof localStorage === 'undefined') return false;
27 try {
28 localStorage.getItem('x');
29 return true;
30 } catch (e) {
31 con.info('Local storage is not available', e);
32 return false;
33 }
34}

Callers 1

localStore.tsFile · 0.85

Calls 1

infoMethod · 0.45

Tested by

no test coverage detected