Comment Comment by jfhr Unless you need to support ancient browsers [1], I'd go the easy way and leave the URL parsing to the browser, e.g. `['http:', 'https:', 'mailto:', 'tel:'].includes(new URL(value, location.origin).protocol)`[1] https://caniuse.com/url parent jfhr 3 years ago
[1] https://caniuse.com/url