UNPKG

reactotron-react-native

Version:

A development tool to explore, inspect, and diagnose your React Native apps.

30 lines (26 loc) 922 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getReactNativeVersionWithModules = getReactNativeVersionWithModules; function getReactNativeVersionWithModules(constants) { try { // dodge some bullets if (!constants) return null; if (!constants.reactNativeVersion) return null; // grab the raw numbers const major = constants.reactNativeVersion.major; const minor = constants.reactNativeVersion.minor; const patch = constants.reactNativeVersion.patch; const prerelease = constants.reactNativeVersion.prerelease; // check the major or jet if (typeof major !== "number") return null; // assemble! const vParts = []; vParts.push(`${major}.${minor}.${patch}`); if (prerelease) vParts.push(`-${prerelease}`); return vParts.join(""); } catch {} return null; } //# sourceMappingURL=getReactNativeVersionWithModules.js.map