MCPcopy Create free account
hub / github.com/cortexkit/magic-context / parse

Function parse

packages/cli/src/commands/setup-pi.ts:98–101  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

96 */
97function comparePiVersion(a: string, b: string): number {
98 const parse = (v: string): [number, number, number] | null => {
99 const match = v.match(/(\d+)\.(\d+)\.(\d+)/);
100 return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null;
101 };
102 const left = parse(a);
103 const right = parse(b);
104 if (!left || !right) return 0;

Callers 7

comparePiVersionFunction · 0.70
checkEmbeddingConfigFunction · 0.70
runDoctorFunction · 0.70
parseRootFunction · 0.50
jsonc.test.tsFile · 0.50
get_available_modelsFunction · 0.50
validate_probe_endpointFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected