MCPcopy
hub / github.com/npmx-dev/npmx.dev / parseVersionRange

Function parseVersionRange

server/utils/compare.ts:7–14  ·  view source on GitHub ↗
(versionRange: string)

Source from the content-addressed store, hash-verified

5 * Supports formats like: "1.0.0...2.0.0" (triple dot, GitHub style)
6 */
7export function parseVersionRange(versionRange: string): { from: string; to: string } | null {
8 const parts = versionRange.split('...')
9 if (parts.length === 2) {
10 return { from: parts[0]!, to: parts[1]! }
11 }
12
13 return null
14}
15
16/** Maximum number of files to include in comparison */
17const MAX_FILES_COMPARE = 1000

Callers 2

[...pkg].get.tsFile · 0.85
[...pkg].get.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected