(url: string)
| 54 | } |
| 55 | |
| 56 | export function getUrlIdentifier(url: string): string { |
| 57 | try { |
| 58 | const { host, pathname } = new URL(url); |
| 59 | const path = pathname === '/' ? '' : pathname; |
| 60 | return `${host}${path}`; |
| 61 | } catch { |
| 62 | return url; |
| 63 | } |
| 64 | } |
no outgoing calls
no test coverage detected