docs: function getProtohost(url) {
    if (typeof url !== 'string' || url.length === 0 || url[0] === '/') {
      return undefined
    }
  
    var searchIndex = url.indexOf('?')
    var pathLength = searchIndex !== -1
      ? searchIndex
      : url.length
    var fqdnIndex = url.substr(0, pathLength).indexOf('://')
  
    return fqdnIndex !== -1
      ? url.substr(0, url.indexOf('/', 3 + fqdnIndex))
      : undefined
  }