INNER CODE UNIT · JavaScript
getCFBundleShortVersionString
stovmascript/react-native-version · index.js:104
function getCFBundleShortVersionString(versionName) {
const match =
versionName && typeof versionName === "string"
? versionName.match(/\d*\.\d*.\d*/g)
: [];
return match && match[0] ? match[0] : versionName;
}
/**
* Determines whether the project is an Expo app or a plain React Native app
* @private
* @return {Boolean} true if the project is an Expo app
*/
function isExpoProject(projPath) {
try {
let module = resolveFrom(projPath, "expo");
let appInfo = require(`${projPath}/app.json`);