MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / parseResolution

Function parseResolution

scripts/fetchLicenses.mjs:91–96  ·  view source on GitHub ↗
(resolution)

Source from the content-addressed store, hash-verified

89}
90
91function parseResolution(resolution) {
92 // resolution format: "<name>@npm:<version>"
93 const match = resolution.match(/^(.+)@npm:(.+)$/);
94 if (!match) return null;
95 return { name: match[1], version: match[2] };
96}
97
98async function fetchLicense(name, version) {
99 const url = `${NPM_REGISTRY}/${encodeURIComponent(name).replace("%40", "@")}/${version}`;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected