GoScrobble/web/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/utils/safeThis.js

20 lines
523 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
/* global globalThis */
/*
This file is copied from `core-js`.
https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js
MIT License
Author: Denis Pushkarev (@zloirock)
*/
const check = function (it) {
return it && it.Math == Math && it;
};
module.exports =
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
Function('return this')();