(raw: string)
| 100 | } |
| 101 | |
| 102 | function parseKeyValuePairs(raw: string): Map<string, string> { |
| 103 | const out = new Map<string, string>(); |
| 104 | for (const token of raw.trim().split(/\s+/).filter(Boolean)) { |
| 105 | const split = token.split('='); |
| 106 | if (split.length !== 2) { |
| 107 | continue; |
| 108 | } |
| 109 | |
| 110 | const key = split[0].trim().toLowerCase(); |
| 111 | if (!key) { |
| 112 | continue; |
| 113 | } |
| 114 | |
| 115 | const value = split[1].trim(); |
| 116 | if (!value) { |
| 117 | continue; |
| 118 | } |
| 119 | |
| 120 | out.set(key, value); |
| 121 | } |
| 122 | return out; |
| 123 | } |
| 124 | |
| 125 | function compareSemverLoose(a: string, b: string): number | null { |
| 126 | const pa = parseSemverParts(a); |
no test coverage detected