MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / isBrowser

Function isBrowser

packages/core/src/utils/isBrowser.ts:7–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5 * Returns true if we are in the browser.
6 */
7export function isBrowser(): boolean {
8 // eslint-disable-next-line no-restricted-globals
9 return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());
10}
11
12type ElectronProcess = { type?: string };
13

Callers 15

setupOnceFunction · 0.90
constructorMethod · 0.90
afterAllSetupMethod · 0.90
openFeature.tsFile · 0.90
constructorMethod · 0.90
launchDarkly.tsFile · 0.90

Calls 2

isNodeEnvFunction · 0.90
isElectronNodeRendererFunction · 0.85

Tested by

no test coverage detected