How to use the @react-native-firebase/app/lib/common/struct.validateStruct 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 / analytics / lib / index.js View on Github external
logLevelUp(object) {
    if (!isObject(object)) {
      throw new Error(
        'firebase.analytics().logLevelUp(*): The supplied arg must be an object of key/values.',
      );
    }

    return this.logEvent(
      'level_up',
      validateStruct(object, structs.LevelUp, 'firebase.analytics().logLevelUp(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logPurchaseRefund(object = {}) {
    validateCompound(object, 'value', 'currency', 'firebase.analytics().logPresentOffer(*):');

    return this.logEvent(
      'purchase_refund',
      validateStruct(object, structs.PurchaseRefund, 'firebase.analytics().logPurchaseRefund(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logEcommercePurchase(object = {}) {
    validateCompound(object, 'value', 'currency', 'firebase.analytics().logEcommercePurchase(*):');

    return this.logEvent(
      'ecommerce_purchase',
      validateStruct(
        object,
        structs.EcommercePurchase,
        'firebase.analytics().logEcommercePurchase(*):',
      ),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logGenerateLead(object = {}) {
    validateCompound(object, 'value', 'currency', 'firebase.analytics().logGenerateLead(*):');

    return this.logEvent(
      'generate_lead',
      validateStruct(object, structs.GenerateLead, 'firebase.analytics().logGenerateLead(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logBeginCheckout(object = {}) {
    validateCompound(object, 'value', 'currency', 'firebase.analytics().logBeginCheckout(*):');

    return this.logEvent(
      'begin_checkout',
      validateStruct(object, structs.BeginCheckout, 'firebase.analytics().logBeginCheckout(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logAddToWishlist(object) {
    if (!isObject(object)) {
      throw new Error(
        'firebase.analytics().logAddToWishlist(*): The supplied arg must be an object of key/values.',
      );
    }

    validateCompound(object, 'value', 'currency', 'firebase.analytics().logAddToWishlist(*):');

    return this.logEvent(
      'add_to_wishlist',
      validateStruct(object, structs.AddToWishlist, 'firebase.analytics().logAddToWishlist(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logLevelEnd(object) {
    if (!isObject(object)) {
      throw new Error(
        'firebase.analytics().logLevelEnd(*): The supplied arg must be an object of key/values.',
      );
    }

    return this.logEvent(
      'level_end',
      validateStruct(object, structs.LevelEnd, 'firebase.analytics().logLevelEnd(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logSignUp(object) {
    if (!isObject(object)) {
      throw new Error(
        'firebase.analytics().logSignUp(*): The supplied arg must be an object of key/values.',
      );
    }

    return this.logEvent(
      'sign_up',
      validateStruct(object, structs.SignUp, 'firebase.analytics().logSignUp(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logSearch(object) {
    if (!isObject(object)) {
      throw new Error(
        'firebase.analytics().logSearch(*): The supplied arg must be an object of key/values.',
      );
    }

    return this.logEvent(
      'search',
      validateStruct(object, structs.Search, 'firebase.analytics().logSearch(*):'),
    );
  }
github invertase / react-native-firebase / packages / analytics / lib / index.js View on Github external
logPresentOffer(object) {
    if (!isObject(object)) {
      throw new Error(
        'firebase.analytics().logPresentOffer(*): The supplied arg must be an object of key/values.',
      );
    }

    validateCompound(object, 'value', 'currency', 'firebase.analytics().logPresentOffer(*):');

    return this.logEvent(
      'present_offer',
      validateStruct(object, structs.PresentOffer, 'firebase.analytics().logPresentOffer(*):'),
    );
  }

@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