(raw: readonly string[] | undefined)
| 93 | } |
| 94 | |
| 95 | export function parseAllowedHostArgs(raw: readonly string[] | undefined): string[] { |
| 96 | if (raw === undefined) return []; |
| 97 | return raw |
| 98 | .flatMap((entry) => entry.split(',')) |
| 99 | .map((entry) => entry.trim()) |
| 100 | .filter((entry) => entry.length > 0); |
| 101 | } |
| 102 | |
| 103 | function parseHost(raw: string | boolean | undefined): string { |
| 104 | if (raw === undefined || raw === false) return DEFAULT_SERVER_HOST; |
no outgoing calls
no test coverage detected