Check-if-a-javascript-String-is-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; }
}