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

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

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

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

    return this.logEvent(
      'remove_from_cart',
      validateStruct(object, structs.RemoveFromCart, 'firebase.analytics().logRemoveFromCart(*):'),
    );
  }
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
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
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
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
logAddToCart(object) {
    if (!isObject(object)) {
      throw new Error(
        'firebase.analytics().logAddToCart(*): The supplied arg must be an object of key/values.',
      );
    }

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

    return this.logEvent(
      'add_to_cart',
      validateStruct(object, structs.AddToCart, 'firebase.analytics().logAddToCart(*):'),
    );
  }

@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 1 day ago

Package Health Score

98 / 100
Full package analysis