I\'ve been searching all over for an answer to this and all of the answers I\'ve found haven\'t been in JavaScript.
I need a way, in javascript, to check if a string sta
Non-Regex declarative way:
export const hasValidUrlProtocol = (url = '') => Boolean(['http://', 'https://', 'ftp://'].some(protocol => url.startsWith(protocol)))