MCPcopy
hub / github.com/webpack/webpack / urlToRelativePath

Function urlToRelativePath

test/harness/runner/RunnerHelpers.js:50–54  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

48 * @returns {string} relative path
49 */
50const urlToRelativePath = (url) => {
51 if (url.startsWith("https://test.cases/path/")) url = url.slice(24);
52 else if (url.startsWith("https://test.cases/")) url = url.slice(19);
53 return `./${url}`;
54};
55
56/**
57 * @returns {number[]} version arr

Callers 2

createCjsRunnerMethod · 0.85
setupEnvMethod · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected