MCPcopy
hub / github.com/sveltejs/kit / resolve

Function resolve

packages/kit/src/utils/url.js:15–23  ·  view source on GitHub ↗
(base, path)

Source from the content-addressed store, hash-verified

13 * @param {string} path
14 */
15export function resolve(base, path) {
16 // special case
17 if (path[0] === '/' && path[1] === '/') return path;
18
19 let url = new URL(base, internal);
20 url = new URL(path, url);
21
22 return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
23}
24
25/** @param {string} path */
26export function is_root_relative(path) {

Callers 15

url.spec.jsFile · 0.90
saveFunction · 0.90
crawlFunction · 0.90
test_make_packageFunction · 0.50
index.jsFile · 0.50
handleFunction · 0.50
loadFunction · 0.50
hooks.server.jsFile · 0.50
loadFunction · 0.50
loadFunction · 0.50
loadFunction · 0.50

Calls

no outgoing calls

Tested by 1