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

Function normalizePath

js/botasaurus-server-js/src/utils.ts:93–99  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

91
92// Helper to normalize path similar to Python's os.path.normpath
93function normalizePath(path: string): string {
94 return path
95 .split("/")
96 .filter(Boolean)
97 .join("/")
98 .replace(/\/+/g, "/");
99}
100
101function cleanBasePath(apiBasePath: string | null | undefined){
102

Callers 1

cleanBasePathFunction · 0.70

Calls 2

joinMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected