MCPcopy
hub / github.com/bestony/logoly / hasWindow

Function hasWindow

src/utils/persistentState.js:14–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12];
13
14const hasWindow = () => typeof window !== 'undefined';
15const hasLocation = () => hasWindow() && typeof window.location !== 'undefined';
16const hasHistory = () => hasWindow() && typeof window.history?.replaceState === 'function';
17const hasLocalStorage = () => hasWindow() && typeof window.localStorage !== 'undefined';

Callers 3

hasLocationFunction · 0.85
hasHistoryFunction · 0.85
hasLocalStorageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected