(url: string)
| 44 | * @returns The host with port if present (e.g., "example.com:443"), or null if not an HTTP(S) URL |
| 45 | */ |
| 46 | const extractHostWithPort = (url: string): string | null => { |
| 47 | // Match http(s):// URLs: protocol://host(:port)/path |
| 48 | const match = url.match(/^https?:\/\/([^/?#]+)/i); |
| 49 | return match ? match[1] : null; |
| 50 | }; |
| 51 | |
| 52 | type CompileResult = { |
| 53 | repoData: RepoData[], |
no outgoing calls
no test coverage detected