(url: string, urlTemplate: string)
| 104 | * @param urlTemplate URL template ("google.*", "youtube.com" etc). |
| 105 | */ |
| 106 | export function isURLMatched(url: string, urlTemplate: string): boolean { |
| 107 | if (isRegExp(urlTemplate)) { |
| 108 | const regexp = createRegExp(urlTemplate); |
| 109 | return regexp ? regexp.test(url) : false; |
| 110 | } |
| 111 | return matchURLPattern(url, urlTemplate); |
| 112 | } |
| 113 | |
| 114 | interface PreparedURL { |
| 115 | hostParts: string[]; |
no test coverage detected