(locator: Locator)
| 122 | } |
| 123 | |
| 124 | function parseURLReference(locator: Locator) { |
| 125 | const {hash, href} = new URL(locator.reference); |
| 126 | if (hash) { |
| 127 | return { |
| 128 | version: encodeURIComponent(href.slice(0, -hash.length)), |
| 129 | build: hash.slice(1).split(`.`), |
| 130 | }; |
| 131 | } |
| 132 | return {version: encodeURIComponent(href), build: []}; |
| 133 | } |
| 134 | |
| 135 | function isValidBinList(x: unknown): x is BinList { |
| 136 | return Array.isArray(x) && x.length > 0; |
no outgoing calls
no test coverage detected
searching dependent graphs…