create-zalo-mini-app
Version:
Create zalo mini app project
18 lines (16 loc) • 334 B
JavaScript
/*
*
* @param {string} stdout
* @returns string | null
*/
const getCLIVersion = (stdout) => {
if (!stdout || typeof stdout !== 'string') {
return '';
}
const lines = stdout.match(/[^\r\n]+/g);
if (lines && lines.length) {
return lines[lines.length - 1].trim();
}
return '';
};
module.exports = getCLIVersion;