(parsedConfig: Configuration)
| 240 | } |
| 241 | |
| 242 | function extractHosts(parsedConfig: Configuration): string[] { |
| 243 | const hosts: Set<string> = new Set<string>(); |
| 244 | parsedConfig.filter(isHostDirective).forEach(c => { |
| 245 | getHostsFromHostConfig(c.value).forEach(h => hosts.add(h)); |
| 246 | }); |
| 247 | |
| 248 | return Array.from(hosts.keys()); |
| 249 | } |
| 250 | |
| 251 | function getHostsFromHostConfig(hostValue: string | string[]): string[] { |
| 252 | const hosts: string[] = Array.isArray(hostValue) ? hostValue : [hostValue]; |
no test coverage detected