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

Function normalizeBasePath

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

Source from the content-addressed store, hash-verified

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

Callers 2

parseArgsFunction · 0.70
startStaticServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected