/** * Provides quick & simple way to verify if some * string is valid URL * * @param <string> URL to verify * @returns <boolean> Returns true if passed string * is valid URL, false otherwise */ function validateUrl (url) { try { new URL(url) } catch (error) { return false } return true }