// This an imperfect polyfill for globalThis export const getGlobal = () => { if (typeof globalThis !== 'undefined') { return globalThis } if (typeof self !== 'undefined') { return self } if (typeof window !== 'undefined') { return window } if (typeof global !== 'undefined') { return global } return null }