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

Function parseComparableCurrentVersion

packages/core/src/version.ts:19–28  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

17}
18
19function parseComparableCurrentVersion(version: string): ParsedComparableVersion | null {
20 const normalized = version.trim().replace(/^v/i, '')
21 const match = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?$/.exec(normalized)
22 if (!match) return null
23
24 return {
25 ...buildParsedVersion(match),
26 prerelease: Boolean(match[4]),
27 }
28}
29
30function buildParsedVersion(match: RegExpExecArray): ParsedStableVersion {
31 return {

Callers 1

isNewerStableVersionFunction · 0.85

Calls 2

buildParsedVersionFunction · 0.85
execMethod · 0.65

Tested by

no test coverage detected