UNPKG

react-native-config-jsi

Version:

⚡️ Fast JSI-based library to access .env variables natively with C++ performance.

26 lines (24 loc) 809 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RNConfig = void 0; var _reactNative = require("react-native"); let _getValue = global.getValue; // Автоинициализация if (!_getValue) { if (_reactNative.NativeModules.ReactNativeConfigJsi?.install) { _reactNative.NativeModules.ReactNativeConfigJsi.install(); // Вызываем native install метод _getValue = global.getValue; // Сохраняем глобальную ссылку на объект SqlDb console.log('react-native-config initialized successfully'); } } const RNConfig = exports.RNConfig = { get: key => { if (typeof key !== 'string') { throw new Error('Key must be a string'); } return _getValue(key); } }; //# sourceMappingURL=index.js.map