@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.
22 lines • 596 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGlobal = void 0;
/* eslint-disable no-restricted-globals */
// This an imperfect polyfill for globalThis
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;
};
exports.getGlobal = getGlobal;
//# sourceMappingURL=get-global.js.map