MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / parse

Function parse

apps/cli/src/update-checker.ts:59–63  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

57
58function isNewerVersion(latest: string, current: string): boolean {
59 const parse = (v: string) => {
60 const [core, pre] = v.split('-', 2)
61 const parts = core.split('.').map(Number)
62 return { major: parts[0] || 0, minor: parts[1] || 0, patch: parts[2] || 0, pre }
63 }
64 const l = parse(latest)
65 const c = parse(current)
66 if (l.major !== c.major) return l.major > c.major

Callers 1

isNewerVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected