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

Function isNodeEnv

packages/core/src/utils/node.ts:13–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 * @returns Answer to given question
12 */
13export function isNodeEnv(): boolean {
14 // explicitly check for browser bundles as those can be optimized statically
15 // by terser/rollup.
16 return (
17 !isBrowserBundle() &&
18 Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'
19 );
20}
21
22/**
23 * Requires a module which is protected against bundler minification.

Callers 5

SentryRootFunction · 0.90
getTraceAndBaggageFunction · 0.90
isBrowserFunction · 0.90

Calls 2

isBrowserBundleFunction · 0.90
callMethod · 0.80

Tested by

no test coverage detected