How to use the @firebase/util.deepCopy function in @firebase/util

To help you get started, we’ve selected a few @firebase/util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sikidamjanovic / cowrite / node_modules / @firebase / app / dist / index.lite.js View on Github external
function FirebaseAppLiteImpl(options, config, firebase_) {
        this.firebase_ = firebase_;
        this.isDeleted_ = false;
        this.services_ = {};
        // lite version has an empty INTERNAL namespace
        this.INTERNAL = {};
        this.name_ = config.name;
        this.automaticDataCollectionEnabled_ =
            config.automaticDataCollectionEnabled || false;
        this.options_ = deepCopy(options);
    }
    Object.defineProperty(FirebaseAppLiteImpl.prototype, "automaticDataCollectionEnabled", {
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.node.cjs.js View on Github external
function FirebaseAppImpl(options, config, firebase_) {
        var e_1, _a;
        var _this = this;
        this.firebase_ = firebase_;
        this.isDeleted_ = false;
        this.name_ = config.name;
        this.automaticDataCollectionEnabled_ =
            config.automaticDataCollectionEnabled || false;
        this.options_ = util.deepCopy(options);
        this.container = new component.ComponentContainer(config.name);
        // add itself to container
        this._addComponent(new component.Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */));
        try {
            // populate ComponentContainer with existing components
            for (var _b = tslib.__values(this.firebase_.INTERNAL.components.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
                var component$1 = _c.value;
                this._addComponent(component$1);
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_1) throw e_1.error; }
github sikidamjanovic / cowrite / node_modules / @firebase / app / dist / index.esm2017.js View on Github external
constructor(options, config, firebase_) {
        this.firebase_ = firebase_;
        this.isDeleted_ = false;
        this.services_ = {};
        // An array to capture listeners before the true auth functions
        // exist
        this.tokenListeners_ = [];
        // An array to capture requests to send events before analytics component loads.
        // eslint-disable-next-line @typescript-eslint/no-explicit-any, use any here to make using function.apply easier
        this.analyticsEventRequests_ = [];
        this.name_ = config.name;
        this.automaticDataCollectionEnabled_ =
            config.automaticDataCollectionEnabled || false;
        this.options_ = deepCopy(options);
        const self = this;
        this.INTERNAL = {
            getUid: () => null,
            getToken: () => Promise.resolve(null),
            addAuthTokenListener: (callback) => {
                this.tokenListeners_.push(callback);
                // Make sure callback is called, asynchronously, in the absence of the auth module
                setTimeout(() => callback(null), 0);
            },
            removeAuthTokenListener: callback => {
                this.tokenListeners_ = this.tokenListeners_.filter(listener => listener !== callback);
            },
            analytics: {
                logEvent() {
                    self.analyticsEventRequests_.push(arguments);
                }
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.cjs.js View on Github external
function FirebaseAppImpl(options, config, firebase_) {
        var e_1, _a;
        var _this = this;
        this.firebase_ = firebase_;
        this.isDeleted_ = false;
        this.name_ = config.name;
        this.automaticDataCollectionEnabled_ =
            config.automaticDataCollectionEnabled || false;
        this.options_ = util.deepCopy(options);
        this.container = new component.ComponentContainer(config.name);
        // add itself to container
        this._addComponent(new component.Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */));
        try {
            // populate ComponentContainer with existing components
            for (var _b = tslib.__values(this.firebase_.INTERNAL.components.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
                var component$1 = _c.value;
                this._addComponent(component$1);
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_1) throw e_1.error; }
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.lite.esm2017.js View on Github external
constructor(options, config, firebase_) {
        this.firebase_ = firebase_;
        this.isDeleted_ = false;
        // lite version has an empty INTERNAL namespace
        this.INTERNAL = {};
        this.name_ = config.name;
        this.automaticDataCollectionEnabled_ =
            config.automaticDataCollectionEnabled || false;
        this.options_ = deepCopy(options);
        this.container = new ComponentContainer(config.name);
        // add itself to container
        this.container.addComponent(new Component('app', () => this, "PUBLIC" /* PUBLIC */));
        // populate ComponentContainer with existing components
        for (const component of this.firebase_.INTERNAL.components.values()) {
            this.container.addComponent(component);
        }
    }
    get automaticDataCollectionEnabled() {
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.esm2017.js View on Github external
constructor(options, config, firebase_) {
        this.firebase_ = firebase_;
        this.isDeleted_ = false;
        this.name_ = config.name;
        this.automaticDataCollectionEnabled_ =
            config.automaticDataCollectionEnabled || false;
        this.options_ = deepCopy(options);
        this.container = new ComponentContainer(config.name);
        // add itself to container
        this._addComponent(new Component('app', () => this, "PUBLIC" /* PUBLIC */));
        // populate ComponentContainer with existing components
        for (const component of this.firebase_.INTERNAL.components.values()) {
            this._addComponent(component);
        }
    }
    get automaticDataCollectionEnabled() {
github firebase / user-privacy / functions / node_modules / @firebase / app / dist / cjs / src / firebaseApp.js View on Github external
function FirebaseAppImpl(options, name, firebase_) {
        this.firebase_ = firebase_;
        this.isDeleted_ = false;
        this.services_ = {};
        this.name_ = name;
        this.options_ = util_1.deepCopy(options);
        this.INTERNAL = {
            getUid: function () { return null; },
            getToken: function () { return Promise.resolve(null); },
            addAuthTokenListener: function (callback) {
                tokenListeners.push(callback);
                // Make sure callback is called, asynchronously, in the absence of the auth module
                setTimeout(function () { return callback(null); }, 0);
            },
            removeAuthTokenListener: function (callback) {
                tokenListeners = tokenListeners.filter(function (listener) { return listener !== callback; });
            }
        };
    }
    Object.defineProperty(FirebaseAppImpl.prototype, "name", {
github firebase / firebase-js-sdk / packages / app / src / firebaseApp.ts View on Github external
constructor(options: FirebaseOptions, config: FirebaseAppConfig) {
    this._name = config.name!;
    this.automaticDataCollectionEnabled_ =
      config.automaticDataCollectionEnabled || false;
    this._options = deepCopy(options);
  }
github firebase / firebase-js-sdk / packages / app / src / lite / firebaseAppLite.ts View on Github external
constructor(
    options: FirebaseOptions,
    config: FirebaseAppConfig,
    private readonly firebase_: _FirebaseNamespace
  ) {
    this.name_ = config.name!;
    this.automaticDataCollectionEnabled_ =
      config.automaticDataCollectionEnabled || false;
    this.options_ = deepCopy(options);
  }