(url: string)
| 11 | * Gets the full URL from a given URL string. |
| 12 | */ |
| 13 | export function getFullURL(url: string): string | undefined { |
| 14 | try { |
| 15 | // By adding a base URL to new URL(), this will also work for relative urls |
| 16 | // If `url` is a full URL, the base URL is ignored anyhow |
| 17 | const parsed = new URL(url, WINDOW.location.origin); |
| 18 | return parsed.href; |
| 19 | } catch { |
| 20 | return undefined; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Checks if the entry is a PerformanceResourceTiming. |
no outgoing calls
no test coverage detected