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

Function normalizeBasePath

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

Source from the content-addressed store, hash-verified

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

Callers 2

parseArgsFunction · 0.70
startStaticServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected