MCPcopy Create free account
hub / github.com/EvoMap/evolver / parseConcreteSemver

Function parseConcreteSemver

src/forceUpdate.js:661–670  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

659let _inFlight = false;
660
661function parseConcreteSemver(version) {
662 var match = CONCRETE_SEMVER_RE.exec(normalizeConcreteSemver(version));
663 if (!match) return null;
664 return {
665 major: match[1],
666 minor: match[2],
667 patch: match[3],
668 prerelease: match[4] ? match[4].split('.') : [],
669 };
670}
671
672function normalizeConcreteSemver(version) {
673 var normalized = String(version || '').replace(/^v(?=\d)/, '');

Callers 1

compareConcreteSemverFunction · 0.85

Calls 1

normalizeConcreteSemverFunction · 0.85

Tested by

no test coverage detected