MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / normalizePath

Function normalizePath

js/botasaurus-desktop-api/src/index.ts:65–71  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

63
64// Helper to normalize path similar to Python's os.path.normpath
65function normalizePath(path: string): string {
66 return path
67 .split("/")
68 .filter(Boolean)
69 .join("/")
70 .replace(/\/+/g, "/");
71}
72function cleanBasePath(apiBasePath: string | null | undefined){
73
74 if (typeof apiBasePath === "string") {

Callers 1

cleanBasePathFunction · 0.70

Calls 2

joinMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected