MCPcopy Index your code
hub / github.com/ThatGuySam/doesitarm / isBrowserContext

Function isBrowserContext

helpers/environment.js:8–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6}
7
8export function isBrowserContext () {
9 // Node 22 exposes a global navigator, so use window/document instead.
10 if ( typeof window === 'undefined' ) return false
11
12 if ( typeof document === 'undefined' ) return false
13
14 return true
15}
16
17export function hasProcesGlobal () {
18 if ( typeof process === 'undefined' ) return false

Callers 3

isDarwinFunction · 0.85
isLinuxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected