MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / getDirectoryRootUrl

Function getDirectoryRootUrl

src/hooks/urlLoaderPolicy.ts:138–148  ·  view source on GitHub ↗
(baseUrl: string)

Source from the content-addressed store, hash-verified

136}
137
138function getDirectoryRootUrl(baseUrl: string): URL | null {
139 try {
140 const url = new URL(baseUrl);
141 url.pathname = ensureTrailingSlash(url.pathname);
142 url.search = '';
143 url.hash = '';
144 return url;
145 } catch {
146 return null;
147 }
148}
149
150function getRelativeUrlPath(rootUrl: URL, targetUrl: URL): string | null {
151 if (targetUrl.origin !== rootUrl.origin) {

Callers 2

getDirectoryListingLinksFunction · 0.85

Calls 1

ensureTrailingSlashFunction · 0.85

Tested by

no test coverage detected