function parseUrl(url = '') {
  const match = url.match(URL_REGEX)
  return {
    href: match[0] || '',
    protocol: match[1] || '',
    hostname: match[2] || '',
    port: match[3] || '',
    pathname: match[4] || '',
    search: match[5] || '',
    hash: match[6] || '',
  }
}
Zero dependency backward compatible url parser
@param {string} url 
@returns {UrlDetails}