(url: string, keepTrailing = false)
| 22 | * file system paths, not URLs. |
| 23 | */ |
| 24 | export const normalize = (url: string, keepTrailing = false): string => { |
| 25 | return url.replace(/\/\/+/g, "/").replace(/\/+$/, keepTrailing ? "/" : "") |
| 26 | } |
| 27 | |
| 28 | // TODO: Might make sense to add Error handling to the logger itself. |
| 29 | export function logError(logger: { error: (msg: string) => void }, prefix: string, err: unknown): void { |
no outgoing calls
no test coverage detected