(url: string)
| 40 | * ``` |
| 41 | */ |
| 42 | export function stripLeadingSlash(url: string): string { |
| 43 | // Check if the first character of the URL is a slash |
| 44 | return url.length > 1 && url[0] === '/' ? url.slice(1) : url; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Adds a leading slash to a URL if it does not already have one. |
no outgoing calls
no test coverage detected