12 lines
245 B
JavaScript
12 lines
245 B
JavaScript
|
export const globalThisShim = (() => {
|
||
|
if (typeof self !== "undefined") {
|
||
|
return self;
|
||
|
}
|
||
|
else if (typeof window !== "undefined") {
|
||
|
return window;
|
||
|
}
|
||
|
else {
|
||
|
return Function("return this")();
|
||
|
}
|
||
|
})();
|