@sfourdrinier/react-native-ble-plx
Version:
React Native Bluetooth Low Energy library
19 lines (18 loc) • 641 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBlePlxPluginDebugEnabled = isBlePlxPluginDebugEnabled;
exports.blePlxPluginDebugLog = blePlxPluginDebugLog;
function isBlePlxPluginDebugEnabled(propDebug) {
if (propDebug === true)
return true;
const env = process.env.BLEPLX_PLUGIN_DEBUG;
if (!env)
return false;
return env === '1' || env.toLowerCase() === 'true' || env.toLowerCase() === 'yes';
}
function blePlxPluginDebugLog(enabled, ...args) {
if (!enabled)
return;
// eslint-disable-next-line no-console
console.log('[BLEPLX_PLUGIN]', ...args);
}