How to use the @firebase/util.contains 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 maierj / fastlane-action / node_modules / @firebase / app / dist / index.esm2017.js View on Github external
function app(name) {
        name = name || DEFAULT_ENTRY_NAME;
        if (!contains(apps, name)) {
            throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name });
        }
        return apps[name];
    }
    // @ts-ignore
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.rn.cjs.js View on Github external
if (rawConfig === void 0) { rawConfig = {}; }
        if (typeof rawConfig !== 'object' || rawConfig === null) {
            var name_1 = rawConfig;
            rawConfig = { name: name_1 };
        }
        var config = rawConfig;
        if (config.name === undefined) {
            config.name = DEFAULT_ENTRY_NAME;
        }
        var name = config.name;
        if (typeof name !== 'string' || !name) {
            throw ERROR_FACTORY.create("bad-app-name" /* BAD_APP_NAME */, {
                appName: String(name)
            });
        }
        if (util.contains(apps, name)) {
            throw ERROR_FACTORY.create("duplicate-app" /* DUPLICATE_APP */, { appName: name });
        }
        var app = new firebaseAppImpl(options, config, namespace);
        apps[name] = app;
        return app;
    }
    /*
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.esm.js View on Github external
function app(name) {
        name = name || DEFAULT_ENTRY_NAME;
        if (!contains(apps, name)) {
            throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name });
        }
        return apps[name];
    }
    // @ts-ignore
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.esm.js View on Github external
if (rawConfig === void 0) { rawConfig = {}; }
        if (typeof rawConfig !== 'object' || rawConfig === null) {
            var name_1 = rawConfig;
            rawConfig = { name: name_1 };
        }
        var config = rawConfig;
        if (config.name === undefined) {
            config.name = DEFAULT_ENTRY_NAME;
        }
        var name = config.name;
        if (typeof name !== 'string' || !name) {
            throw ERROR_FACTORY.create("bad-app-name" /* BAD_APP_NAME */, {
                appName: String(name)
            });
        }
        if (contains(apps, name)) {
            throw ERROR_FACTORY.create("duplicate-app" /* DUPLICATE_APP */, { appName: name });
        }
        var app = new firebaseAppImpl(options, config, namespace);
        apps[name] = app;
        return app;
    }
    /*
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.esm2017.js View on Github external
function initializeApp(options, rawConfig = {}) {
        if (typeof rawConfig !== 'object' || rawConfig === null) {
            const name = rawConfig;
            rawConfig = { name };
        }
        const config = rawConfig;
        if (config.name === undefined) {
            config.name = DEFAULT_ENTRY_NAME;
        }
        const { name } = config;
        if (typeof name !== 'string' || !name) {
            throw ERROR_FACTORY.create("bad-app-name" /* BAD_APP_NAME */, {
                appName: String(name)
            });
        }
        if (contains(apps, name)) {
            throw ERROR_FACTORY.create("duplicate-app" /* DUPLICATE_APP */, { appName: name });
        }
        const app = new firebaseAppImpl(options, config, namespace);
        apps[name] = app;
        return app;
    }
    /*
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.lite.esm2017.js View on Github external
function initializeApp(options, rawConfig = {}) {
        if (typeof rawConfig !== 'object' || rawConfig === null) {
            const name = rawConfig;
            rawConfig = { name };
        }
        const config = rawConfig;
        if (config.name === undefined) {
            config.name = DEFAULT_ENTRY_NAME;
        }
        const { name } = config;
        if (typeof name !== 'string' || !name) {
            throw ERROR_FACTORY.create("bad-app-name" /* BAD_APP_NAME */, {
                appName: String(name)
            });
        }
        if (contains(apps, name)) {
            throw ERROR_FACTORY.create("duplicate-app" /* DUPLICATE_APP */, { appName: name });
        }
        const app = new firebaseAppImpl(options, config, namespace);
        apps[name] = app;
        return app;
    }
    /*
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.rn.cjs.js View on Github external
function app(name) {
        name = name || DEFAULT_ENTRY_NAME;
        if (!util.contains(apps, name)) {
            throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name });
        }
        return apps[name];
    }
    // @ts-ignore
github sikidamjanovic / cowrite / node_modules / @firebase / app / dist / index.esm2017.js View on Github external
function app(name) {
        name = name || DEFAULT_ENTRY_NAME;
        if (!contains(apps, name)) {
            throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name });
        }
        return apps[name];
    }
    // @ts-ignore
github maierj / fastlane-action / node_modules / @firebase / app / dist / index.lite.js View on Github external
function app(name) {
        name = name || DEFAULT_ENTRY_NAME;
        if (!contains(apps, name)) {
            throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name });
        }
        return apps[name];
    }
    // @ts-ignore
github firebase / firebase-js-sdk / packages / database / src / core / stats / StatsReporter.ts View on Github external
each(stats, (stat: string, value: number) => {
      if (value > 0 && contains(this.statsToReport_, stat)) {
        reportedStats[stat] = value;
        haveStatsToReport = true;
      }
    });