jose/dist/browser/runtime/global.js
2021-09-07 12:21:45 +02:00

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();