(v: string)
| 96 | */ |
| 97 | function 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; |
no outgoing calls
no test coverage detected