(url: string)
| 57 | * ``` |
| 58 | */ |
| 59 | export function addLeadingSlash(url: string): string { |
| 60 | // Check if the URL already starts with a slash |
| 61 | return url[0] === '/' ? url : `/${url}`; |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Adds a trailing slash to a URL if it does not already have one. |
no outgoing calls
no test coverage detected