mirror of
https://github.com/danbulant/jose
synced 2026-05-25 04:51:47 +00:00
10 lines
298 B
JavaScript
10 lines
298 B
JavaScript
function getGlobal() {
|
|
if (typeof globalThis !== 'undefined')
|
|
return globalThis;
|
|
if (typeof self !== 'undefined')
|
|
return self;
|
|
if (typeof window !== 'undefined')
|
|
return window;
|
|
throw new Error('unable to locate global object');
|
|
}
|
|
export default getGlobal();
|