@segment/analytics-next
Version:
Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.
21 lines • 553 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGlobal = void 0;
// 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