mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-24 10:46:04 +10:00
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")();
|
|
}
|
|
})();
|