(basePath: string, url: string)
| 308 | } |
| 309 | |
| 310 | function _stripBasePath(basePath: string, url: string): string { |
| 311 | if (!basePath || !url.startsWith(basePath)) { |
| 312 | return url; |
| 313 | } |
| 314 | const strippedUrl = url.substring(basePath.length); |
| 315 | if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) { |
| 316 | return strippedUrl; |
| 317 | } |
| 318 | return url; |
| 319 | } |
| 320 | |
| 321 | function _stripIndexHtml(url: string): string { |
| 322 | return url.replace(/\/index\.html$/, ''); |
no outgoing calls
no test coverage detected
searching dependent graphs…