MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / normalizeBasePath

Function normalizeBasePath

scripts/static-server.mjs:211–217  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

209}
210
211function normalizeBasePath(value) {
212 const raw = (value ?? "").trim();
213 if (!raw || raw === "/") return "/";
214
215 const withLeadingSlash = raw.startsWith("/") ? raw : `/${raw}`;
216 return withLeadingSlash.replace(/\/+$/, "");
217}
218
219function showHelp() {
220 console.log(`

Callers 2

parseArgsFunction · 0.70
startStaticServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected