@malagu/core
Version:
17 lines (15 loc) • 363 B
text/typescript
function getGlobalThis() {
if (typeof globalThis !== 'undefined') {
return globalThis;
}
if (typeof global !== 'undefined') {
return global;
}
if (typeof window !== 'undefined') {
return window;
}
if (typeof self !== 'undefined') {
return self;
}
}
export const currentThis: any = getGlobalThis();