@interopio/iocd-cli
Version:
CLI tool for setting up, building and packaging io.Connect Desktop platforms
16 lines • 590 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeVersionFourDigitsIfNeeded = makeVersionFourDigitsIfNeeded;
function makeVersionFourDigitsIfNeeded(version) {
// count the number of . in the version. if less than 3, append .0 until it has 3 dots.
let dotCount = version.split('.').length - 1;
if (dotCount >= 3)
return version; // already has 3 or more dots
// Append .0 until we have 3 dots
while (dotCount < 3) {
version += '.0';
dotCount++;
}
return version;
}
//# sourceMappingURL=version.js.map
;