MCPcopy
hub / github.com/filebrowser/filebrowser / removePrefix

Function removePrefix

frontend/src/api/utils.ts:76–82  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

74}
75
76export function removePrefix(url: string): string {
77 url = url.split("/").splice(2).join("/");
78
79 if (url === "") url = "/";
80 if (url[0] !== "/") url = "/" + url;
81 return url;
82}
83
84export function createURL(endpoint: string, searchParams = {}): string {
85 let prefix = baseURL;

Callers 14

checkConflictFunction · 0.90
commandFunction · 0.90
fetchFunction · 0.90
fetchAllFunction · 0.90
resourceActionFunction · 0.90
downloadFunction · 0.90
postResourcesFunction · 0.90
moveCopyFunction · 0.90
usageFunction · 0.90
fetchFunction · 0.90
uploadFunction · 0.90
searchFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected