@planjs/utils
Version:
🔧 Common tools collection
37 lines (26 loc) • 839 B
JavaScript
import _typeof from "@babel/runtime/helpers/esm/typeof";
var check = function check(it) {
return it && it.Object === Object && it;
};
/**
* global
*/
var _global = check((typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global);
/**
* window
*/
var _window = check((typeof window === "undefined" ? "undefined" : _typeof(window)) == 'object' && window);
/**
* globalThis
*/
var _globalThis = check((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) == 'object' && globalThis);
/**
* self
*/
// eslint-disable-next-line no-restricted-globals
var _self = check((typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self);
/**
* 全局对象
*/
var root = _globalThis || _window || _global || _self || Function('return this')();
export default root;