MCPcopy Create free account
hub / github.com/Microck/opencode-studio / compareVersions

Function compareVersions

client-next/src/lib/api.ts:91–101  ·  view source on GitHub ↗
(current: string, minimum: string)

Source from the content-addressed store, hash-verified

89}
90
91function compareVersions(current: string, minimum: string): boolean {
92 const c = current.split('.').map(Number);
93 const m = minimum.split('.').map(Number);
94 for (let i = 0; i < Math.max(c.length, m.length); i++) {
95 const cv = c[i] || 0;
96 const mv = m[i] || 0;
97 if (cv > mv) return true;
98 if (cv < mv) return false;
99 }
100 return true;
101}
102
103export interface HealthResponse {
104 status: string;

Callers 1

checkVersionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected