(url: string)
| 150 | * at its development default in production. |
| 151 | */ |
| 152 | export function isLocalhostUrl(url: string): boolean { |
| 153 | try { |
| 154 | const { hostname } = new URL(url) |
| 155 | return LOCALHOST_HOSTNAMES.has(hostname) |
| 156 | } catch { |
| 157 | return false |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Returns the current browser origin, or `null` when called server-side. |
no outgoing calls
no test coverage detected