component/util.js
/* 
  Parse hostname from a give URL
*/
Parse hostname from a give URL
Parse hostname from a give URL
function parseHostname(url) {
  if(url.indexOf(".") === -1)
    return ""; 
  return (new URL(url)).host.toLowerCase();
}
function parseHostname ( url ) { if ( url . indexOf ( "." ) === - 1 ) return "" ; return ( new URL ( url ) ) . host . toLowerCase ( ) ; }
Parse hostname from a give URL
Parse hostname from a give URL