How to use the @react-native-firebase/app/lib/common/deeps.deepGet function in @react-native-firebase/app

To help you get started, we’ve selected a few @react-native-firebase/app 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 invertase / react-native-firebase / packages / database / lib / DatabaseDataSnapshot.js View on Github external
child(path) {
    if (!isString(path)) {
      throw new Error("snapshot().child(*) 'path' must be a string value");
    }

    let value = deepGet(this._snapshot.value, path);

    if (value === undefined) {
      value = null;
    }

    const childRef = this._ref.child(path);

    return new DatabaseDataSnapshot(childRef, {
      value,
      key: childRef.key,
      exists: value !== null,
      childKeys: isObject(value) ? Object.keys(value) : [],
    });
  }
github invertase / react-native-firebase / packages / database / lib / DatabaseDataSnapshot.js View on Github external
hasChild(path) {
    if (!isString(path)) {
      throw new Error("snapshot.hasChild(*) 'path' must be a string value.");
    }

    return deepGet(this._snapshot.value, path) !== undefined;
  }

@react-native-firebase/app

A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Sto

Apache-2.0
Latest version published 27 days ago

Package Health Score

98 / 100
Full package analysis