(host: string)
| 43 | |
| 44 | /** True when `host` is a loopback address (this host only). */ |
| 45 | export function isLoopbackHost(host: string): boolean { |
| 46 | return host === 'localhost' || host === '127.0.0.1' || host === '::1'; |
| 47 | } |
| 48 | |
| 49 | function hostOrigin(host: string, port: number): string { |
| 50 | const family = host.includes(':') ? 'IPv6' : 'IPv4'; |
no outgoing calls
no test coverage detected