MCPcopy
hub / github.com/foambubble/foam / parse

Function parse

packages/foam-cli/src/support/version.ts:21–21  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

19
20export function isNewerVersion(candidate: string, current: string): boolean {
21 const parse = (v: string) => v.split('.').map(Number);
22 const [cMaj, cMin, cPat] = parse(candidate);
23 const [rMaj, rMin, rPat] = parse(current);
24 if (cMaj !== rMaj) return cMaj > rMaj;

Callers 1

isNewerVersionFunction · 0.70

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected