@datadog/mobile-react-native
Version:
A client-side React Native module to interact with Datadog
33 lines (30 loc) • 866 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GlobalState = void 0;
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2016-Present Datadog, Inc.
*/
/**
* A singleton container for attributes that are shared internally across all
* the SDK classes.
*/
class GlobalState {
/**
* `true` if the SDK is initialized, `false` otherwise.
*/
isInitialized = false;
// Singleton implementation
static _instance = undefined;
static get instance() {
if (this._instance === undefined) {
this._instance = new GlobalState();
}
return this._instance;
}
}
exports.GlobalState = GlobalState;
//# sourceMappingURL=GlobalState.js.map