MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / splitVersion

Function splitVersion

src/utils/updateCheck.ts:61–69  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

59}
60
61function splitVersion(v: string): [number[], string] {
62 const [main, pre = ""] = v.split("-", 2);
63 const parts = main.split(".").map((p) => {
64 const n = Number.parseInt(p, 10);
65 return Number.isFinite(n) ? n : 0;
66 });
67 while (parts.length < 3) parts.push(0);
68 return [parts, pre];
69}
70
71interface CachedCheck {
72 checkedAt: number;

Callers 1

compareVersionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected