MCPcopy Create free account
hub / github.com/NanmiCoder/cc-haha / isPythonVersionAtLeast

Function isPythonVersionAtLeast

src/server/api/computer-use-python.ts:72–83  ·  view source on GitHub ↗
(
  version: string | null,
  major: number,
  minor: number,
)

Source from the content-addressed store, hash-verified

70}
71
72export function isPythonVersionAtLeast(
73 version: string | null,
74 major: number,
75 minor: number,
76): boolean {
77 if (!version) return false
78 const match = version.match(/^(\d+)\.(\d+)/)
79 if (!match) return false
80 const currentMajor = Number(match[1])
81 const currentMinor = Number(match[2])
82 return currentMajor > major || (currentMajor === major && currentMinor >= minor)
83}
84
85function firstOutputLine(output: string): string | null {
86 const line = output

Calls

no outgoing calls

Tested by

no test coverage detected