MCPcopy Create free account
hub / github.com/anomalyco/opencode / parse

Function parse

packages/tui/src/app.tsx:165–168  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

163
164function isVersionGreater(left: string, right: string) {
165 const parse = (value: string) => {
166 const [core, prerelease] = value.replace(/^v/, "").split("-", 2)
167 return { core: core.split(".").map((part) => Number.parseInt(part, 10) || 0), prerelease }
168 }
169 const a = parse(left)
170 const b = parse(right)
171 for (let index = 0; index < Math.max(a.core.length, b.core.length); index++) {

Callers 1

isVersionGreaterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected