123456789101112131415161718192021 |
- import { isNodeEnv } from './node.js';
- import { GLOBAL_OBJ } from './worldwide.js';
- function isBrowser() {
-
- return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());
- }
- function isElectronNodeRenderer() {
- return (
-
- (GLOBAL_OBJ ).process !== undefined && ((GLOBAL_OBJ ).process ).type === 'renderer'
- );
- }
- export { isBrowser };
|