MCPcopy
hub / github.com/claude-code-best/claude-code / gte

Function gte

src/cli/updateCCB.ts:83–92  ·  view source on GitHub ↗

* Compare two semver strings. Returns true if a >= b.

(a: string, b: string)

Source from the content-addressed store, hash-verified

81 * Compare two semver strings. Returns true if a >= b.
82 */
83function gte(a: string, b: string): boolean {
84 const parseVer = (v: string) => v.replace(/^\D/, '').split('.').map(Number)
85 const pa = parseVer(a)
86 const pb = parseVer(b)
87 for (let i = 0; i < 3; i++) {
88 if ((pa[i] ?? 0) > (pb[i] ?? 0)) return true
89 if ((pa[i] ?? 0) < (pb[i] ?? 0)) return false
90 }
91 return true
92}
93
94export async function updateCCB(): Promise<void> {
95 const currentVersion = getCurrentVersion()

Callers 3

updateCCBFunction · 0.70
AutoUpdaterFunction · 0.50

Calls 1

parseVerFunction · 0.85

Tested by

no test coverage detected