(url: string)
| 172 | } |
| 173 | |
| 174 | export function isValidUrl(url: string): boolean { |
| 175 | try { |
| 176 | new URL(url); |
| 177 | return true; |
| 178 | } catch (e) { |
| 179 | return false; |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | export function escapeForRegExp(s: string): string { |
| 184 | const chars = '^[]{}()\\.^$*+?|-,'; |
no outgoing calls
no test coverage detected