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

20 lines
523 B
JavaScript

/* 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')();