(apiBasePath: string | null | undefined)
| 70 | .replace(/\/+/g, "/"); |
| 71 | } |
| 72 | function cleanBasePath(apiBasePath: string | null | undefined){ |
| 73 | |
| 74 | if (typeof apiBasePath === "string") { |
| 75 | let path = apiBasePath ? normalizePath(apiBasePath) : ""; |
| 76 | |
| 77 | if (path === ".") { |
| 78 | path = ""; |
| 79 | } else if (path) { |
| 80 | if (!path.startsWith("/")) { |
| 81 | path = "/" + path; |
| 82 | } |
| 83 | if (path.endsWith("/")) { |
| 84 | path = path.slice(0, -1); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | return path; |
| 89 | } |
| 90 | return '' |
| 91 | |
| 92 | } |
| 93 | /** |
| 94 | * Configuration options for the Api client |
| 95 | */ |
no test coverage detected