(url: string)
| 21 | * ``` |
| 22 | */ |
| 23 | export function stripTrailingSlash(url: string): string { |
| 24 | // Check if the last character of the URL is a slash |
| 25 | return url.length > 1 && url.at(-1) === '/' ? url.slice(0, -1) : url; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Removes the leading slash from a URL if it exists. |
no outgoing calls
no test coverage detected