How to use the @react-native-firebase/app/lib/common.validateOptionalNativeDependencyExists 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 / ml-natural-language / lib / index.js View on Github external
identifyLanguage(text, options = {}) {
    validateOptionalNativeDependencyExists(
      'ml_natural_language_language_id_model',
      'ML Kit Language Identification',
      !!this.native.identifyLanguage,
    );
    validateIdentifyLanguageArgs(text, options, 'identifyLanguage');
    return this.native.identifyLanguage(text.slice(0, 200), options);
  }
github invertase / react-native-firebase / packages / ml-natural-language / lib / index.js View on Github external
identifyPossibleLanguages(text, options = {}) {
    validateOptionalNativeDependencyExists(
      'ml_natural_language_language_id_model',
      'ML Kit Language Identification',
      !!this.native.identifyPossibleLanguages,
    );
    validateIdentifyLanguageArgs(text, options, 'identifyPossibleLanguages');
    return this.native.identifyPossibleLanguages(
      text.slice(0, 200),
      Object.assign({}, options, { multipleLanguages: true }),
    );
  }
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
cloudImageLabelerProcessImage(localImageFilePath, cloudImageLabelerOptions) {
    validateOptionalNativeDependencyExists(
      'ml_vision_image_label_model',
      'ML Kit Vision Image Labeler',
      !!this.native.imageLabelerProcessImage,
    );

    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().cloudImageLabelerProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionCloudImageLabelerOptions(cloudImageLabelerOptions);
    } catch (e) {
      throw new Error(`firebase.vision().cloudImageLabelerProcessImage(_, *) ${e.message}.`);
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
imageLabelerProcessImage(localImageFilePath, imageLabelerOptions) {
    validateOptionalNativeDependencyExists(
      'ml_vision_image_label_model',
      'ML Kit Vision Image Labeler',
      !!this.native.imageLabelerProcessImage,
    );

    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().imageLabelerProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionImageLabelerOptions(imageLabelerOptions);
    } catch (e) {
      throw new Error(`firebase.vision().imageLabelerProcessImage(_, *) ${e.message}.`);
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
faceDetectorProcessImage(localImageFilePath, faceDetectorOptions) {
    validateOptionalNativeDependencyExists(
      'ml_vision_face_model',
      'ML Kit Vision Face Detector',
      !!this.native.faceDetectorProcessImage,
    );

    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().faceDetectorProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionFaceDetectorOptions(faceDetectorOptions);
    } catch (e) {
      throw new Error(

@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