MCPcopy Index your code
hub / github.com/devcontainers/cli / parseVersion

Function parseVersion

src/spec-common/commonUtils.ts:506–513  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

504}
505
506export function parseVersion(str: string) {
507 const m = /^'?v?(\d+(\.\d+)*)/.exec(str);
508 if (!m) {
509 return undefined;
510 }
511 return m[1].split('.')
512 .map(i => parseInt(i, 10));
513}
514
515export function isEarlierVersion(left: number[], right: number[]) {
516 for (let i = 0, n = Math.max(left.length, right.length); i < n; i++) {

Callers 6

lookupParsedVersionFunction · 0.90
getDefaultImageNameFunction · 0.90
readDockerComposeConfigFunction · 0.90
useNewProjectNameFunction · 0.90
getFeaturesBuildOptionsFunction · 0.90

Calls 1

execMethod · 0.65

Tested by

no test coverage detected