UNPKG

@datadog/mobile-react-native

Version:

A client-side React Native module to interact with Datadog

35 lines (33 loc) 964 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AttributesSingleton = 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. */ class AttributesProvider { attributes = {}; setAttributes = attributes => { this.attributes = { ...this.attributes, ...attributes }; }; getAttributes = () => { return this.attributes; }; } class AttributesSingleton { static attributesProvider = new AttributesProvider(); static getInstance = () => { return AttributesSingleton.attributesProvider; }; static reset = () => { AttributesSingleton.attributesProvider = new AttributesProvider(); }; } exports.AttributesSingleton = AttributesSingleton; //# sourceMappingURL=AttributesSingleton.js.map