jose/dist/browser/runtime/global.js
2021-08-20 14:56:25 +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();