MCPcopy Create free account
hub / github.com/babel/babel / resolve

Function resolve

test/runtime-integration/node-versions.mjs:68–72  ·  view source on GitHub ↗
(spec)

Source from the content-addressed store, hash-verified

66
67// index.json is sorted from newest to oldest
68function resolve(spec) {
69 const release = releases.find(r => r.version.startsWith(`v${spec}.`));
70 if (!release) throw new Error(`Unknown Node.js version: ${spec}`);
71 return release.version;
72}
73
74async function install(version) {
75 const dir = path.join(root, version);

Callers 3

node-versions.mjsFile · 0.70
testFunction · 0.70
lintFunction · 0.50

Calls 1

findMethod · 0.80

Tested by 1

testFunction · 0.56