UNPKG

react-native-ble-nitro

Version:

High-performance React Native BLE library built on Nitro Modules

16 lines (15 loc) 486 B
import { BleNitroManager } from "./manager"; let _instance; export class BleNitro extends BleNitroManager { /** * Get a singleton instance of BleNitro, will create one if it does not exist. * Singleton implementation does not allow to use state restoration on iOS! * @returns {BleNitroManager} An instance of BleNitro */ static instance() { if (!_instance) { _instance = new BleNitroManager(); } return _instance; } }