UNPKG

rn-biometric-tracker

Version:

rn-biometric-tracker is a lightweight React Native library used to track biometric changes on the device. It enables you to detect when a user adds or removes biometric data (like fingerprint or face unlock) after tracking is enabled.

37 lines (35 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _reactNative = require("react-native"); const LINKING_ERROR = `The package 'rn-biometric-tracker' doesn't seem to be linked. Make sure: \n\n` + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n'; // @ts-expect-error const isTurboModuleEnabled = global.__turboModuleProxy != null; const RnBiometricTrackerModule = isTurboModuleEnabled ? require('./NativeRnBiometricTracker').default : _reactNative.NativeModules.RnBiometricTracker; const RnBiometricTracker = RnBiometricTrackerModule ? RnBiometricTrackerModule : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); function enableBiometric() { return RnBiometricTracker.enableBiometric(); } function disableBiometric() { return RnBiometricTracker.disableBiometric(); } function isBiometricEnabled() { return RnBiometricTracker.isBiometricEnabled(); } function isBiometricChanged() { return RnBiometricTracker.isBiometricChanged(); } const BioTrack = { enableBiometric, disableBiometric, isBiometricEnabled, isBiometricChanged }; var _default = exports.default = BioTrack; //# sourceMappingURL=index.js.map