You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
784 B
14 lines
784 B
5 months ago
|
import { maybe } from "./maybe.js";
|
||
|
export default (maybe(function () { return globalThis; }) ||
|
||
|
maybe(function () { return window; }) ||
|
||
|
maybe(function () { return self; }) ||
|
||
|
maybe(function () { return global; }) || // We don't expect the Function constructor ever to be invoked at runtime, as
|
||
|
// long as at least one of globalThis, window, self, or global is defined, so
|
||
|
// we are under no obligation to make it easy for static analysis tools to
|
||
|
// detect syntactic usage of the Function constructor. If you think you can
|
||
|
// improve your static analysis to detect this obfuscation, think again. This
|
||
|
// is an arms race you cannot win, at least not in JavaScript.
|
||
|
maybe(function () {
|
||
|
return maybe.constructor("return this")();
|
||
|
}));
|
||
|
//# sourceMappingURL=global.js.map
|