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

Function normalizeBasePath

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

Source from the content-addressed store, hash-verified

234}
235
236function normalizeBasePath(value) {
237 const raw = (value ?? "").trim();
238 if (!raw || raw === "/") return "/";
239
240 const withLeadingSlash = raw.startsWith("/") ? raw : `/${raw}`;
241 return withLeadingSlash.replace(/\/+$/, "");
242}
243
244function showHelp() {
245 console.log(`

Callers 2

parseArgsFunction · 0.70
startStaticServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected