@segment/analytics-core
Version:
This package represents core 'shared' functionality that is shared by analytics packages. This is not designed to be used directly, but internal to analytics-node and analytics-browser.
18 lines • 467 B
JavaScript
/* eslint-disable no-restricted-globals */
// This an imperfect polyfill for globalThis
export var getGlobal = function () {
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;
};
//# sourceMappingURL=get-global.js.map