MCPcopy Index your code
hub / github.com/nodejs/corepack / parseURLReference

Function parseURLReference

sources/corepackUtils.ts:124–133  ·  view source on GitHub ↗
(locator: Locator)

Source from the content-addressed store, hash-verified

122}
123
124function 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
135function isValidBinList(x: unknown): x is BinList {
136 return Array.isArray(x) && x.length > 0;

Callers 1

installVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…