Check-if-a-javaScript-String-is-a-url
const isUrl = string => {
try { return Boolean(new URL(string)); }
catch(e){ return false; }
}
Borma
const isUrl = string => {
try { return Boolean(new URL(string)); }
catch(e){ return false; }
}