code: function isURL(token) {
    try {
      if (!validProtocols.test(token)) {
        return false;
      }
      new URL(token);
      return true;
    } catch (e) {
      return false;
    }
  }
docs: Determines whether a string token is a valid URL.
  
  @param string token
  The token.
  @return boolean
  Whether the token is a URL.