mirror of
https://github.com/MarSeventh/CloudFlare-ImgBed.git
synced 2026-04-26 23:25:11 +00:00
init
This commit is contained in:
23
node_modules/@sentry/utils/cjs/isBrowser.js
generated
vendored
Normal file
23
node_modules/@sentry/utils/cjs/isBrowser.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const node = require('./node.js');
|
||||
const worldwide = require('./worldwide.js');
|
||||
|
||||
/**
|
||||
* Returns true if we are in the browser.
|
||||
*/
|
||||
function isBrowser() {
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
return typeof window !== 'undefined' && (!node.isNodeEnv() || isElectronNodeRenderer());
|
||||
}
|
||||
|
||||
// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them
|
||||
function isElectronNodeRenderer() {
|
||||
return (
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
|
||||
(worldwide.GLOBAL_OBJ ).process !== undefined && ((worldwide.GLOBAL_OBJ ).process ).type === 'renderer'
|
||||
);
|
||||
}
|
||||
|
||||
exports.isBrowser = isBrowser;
|
||||
//# sourceMappingURL=isBrowser.js.map
|
||||
Reference in New Issue
Block a user