(url: URL)
| 141 | * ``` |
| 142 | */ |
| 143 | export function stripIndexHtmlFromURL(url: URL): URL { |
| 144 | if (url.pathname.endsWith('/index.html')) { |
| 145 | const modifiedURL = new URL(url); |
| 146 | // Remove '/index.html' from the pathname |
| 147 | modifiedURL.pathname = modifiedURL.pathname.slice(0, /** '/index.html'.length */ -11); |
| 148 | |
| 149 | return modifiedURL; |
| 150 | } |
| 151 | |
| 152 | return url; |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Resolves `*` placeholders in a path template by mapping them to corresponding segments |
no outgoing calls
no test coverage detected