(url: string)
| 61 | |
| 62 | // URL patterns are guaranteed to not have protocol and leading '/' |
| 63 | export function getDomain(url: string): string { |
| 64 | try { |
| 65 | return (new URL(url)).hostname.toLowerCase(); |
| 66 | } catch (error) { |
| 67 | return url.split('/')[0].toLowerCase(); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | function processSiteFixesConfigBlock(text: string, offsets: Array<[number, number]>, recordStart: number, recordEnd: number, urls: Array<readonly string[]>) { |
| 72 | // TODO: more formal definition of URLs and delimiters |
no outgoing calls
no test coverage detected