UNPKG

@sentry/core

Version:
15 lines (14 loc) • 415 B
import { isNodeEnv } from "./node.js"; import { GLOBAL_OBJ } from "./worldwide.js"; // src/utils/isBrowser.ts /** * Returns true if we are in the browser. */ function isBrowser() { return typeof window !== "undefined" && (!isNodeEnv() || isElectronNodeRenderer()); } function isElectronNodeRenderer() { return GLOBAL_OBJ.process?.type === "renderer"; } export { isBrowser }; //# sourceMappingURL=isBrowser.js.map