MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / parseVersion

Function parseVersion

apps/desktop/src/update-check.ts:86–90  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

84}
85
86function parseVersion(v: string): { core: [number, number, number]; pre: string } {
87 const [core, ...preParts] = v.split('-')
88 const nums = core.split('.').map((n) => Number.parseInt(n, 10) || 0)
89 return { core: [nums[0] ?? 0, nums[1] ?? 0, nums[2] ?? 0], pre: preParts.join('-') }
90}

Callers 1

compareVersionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected