MCPcopy
hub / github.com/webpack/webpack / urlToPath

Function urlToPath

test/harness/runner/RunnerHelpers.js:40–44  ·  view source on GitHub ↗
(url, outputDirectory)

Source from the content-addressed store, hash-verified

38 * @returns {string} absolute path
39 */
40const urlToPath = (url, outputDirectory) => {
41 if (url.startsWith("https://test.cases/path/")) url = url.slice(24);
42 else if (url.startsWith("https://test.cases/")) url = url.slice(19);
43 return path.resolve(outputDirectory, `./${url}`);
44};
45
46/**
47 * @param {string} url url

Callers 2

_resolveModuleMethod · 0.85
fetchMethod · 0.85

Calls 2

sliceMethod · 0.80
resolveMethod · 0.65

Tested by

no test coverage detected