MCPcopy Index your code
hub / github.com/nodejs/node / parsePartial

Function parsePartial

test/fixtures/snapshot/typescript.js:3498–3505  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

3496 return alternatives;
3497 }
3498 function parsePartial(text) {
3499 var match = partialRegExp.exec(text);
3500 if (!match)
3501 return undefined;
3502 var major = match[1], _a = match[2], minor = _a === void 0 ? "*" : _a, _b = match[3], patch = _b === void 0 ? "*" : _b, prerelease = match[4], build = match[5];
3503 var version = new Version(isWildcard(major) ? 0 : parseInt(major, 10), isWildcard(major) || isWildcard(minor) ? 0 : parseInt(minor, 10), isWildcard(major) || isWildcard(minor) || isWildcard(patch) ? 0 : parseInt(patch, 10), prerelease, build);
3504 return { version: version, major: major, minor: minor, patch: patch };
3505 }
3506 function parseHyphen(left, right, comparators) {
3507 var leftResult = parsePartial(left);
3508 if (!leftResult)

Callers 2

parseHyphenFunction · 0.85
parseComparatorFunction · 0.85

Calls 2

isWildcardFunction · 0.85
execMethod · 0.45

Tested by

no test coverage detected