packages/devtools-reps/src/reps/rep-utils.js
function isURL(token) {
  try {
    if (!validProtocols.test(token)) {
      return false;
    }
    new URL(token);
    return true;
  } catch (e) {
    return false;
  }
}
function isURL(token) {
  try {
    if (!validProtocols.test(token)) {
      return false;
    }
    new URL(token);
    return true;
  } catch (e) {
    return false;
  }
}
function isURL ( token ) { try { if ( ! validProtocols . test ( token ) ) { return false ; } new URL ( token ) ; return true ; } catch ( e ) { return false ; } }
Determines whether a string token is a valid URL.

@param string token
The token.
@return boolean
Whether the token is a URL.
Determines whether a string token is a valid URL .