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

Function normalizeBasePath

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

Source from the content-addressed store, hash-verified

171}
172
173function normalizeBasePath(value) {
174 const raw = (value ?? "").trim();
175 if (!raw || raw === "/") return "/";
176
177 const withLeadingSlash = raw.startsWith("/") ? raw : `/${raw}`;
178 return withLeadingSlash.replace(/\/+$/, "");
179}
180
181function showHelp() {
182 console.log(`

Callers 2

parseArgsFunction · 0.70
startStaticServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected