lib/helper.js
function normalizeServer(server) {
  // normalize hostname
  if (!reProtocol.test(server)) {
    server = 'http://' + server;
  }
  server = url.parse(server);

  return {
    protocol: server.protocol,
    hostname: server.hostname,
    auth: server.auth,
    pathname: server.pathname,
    port: parseInt(server.port, 10) || (server.protocol === 'https:' ? 443 : 80)
  };
}
function normalizeServer(server) {
  // normalize hostname
  if (!reProtocol.test(server)) {
    server = 'http://' + server;
  }
  server = url.parse(server);

  return {
    protocol: server.protocol,
    hostname: server.hostname,
    auth: server.auth,
    pathname: server.pathname,
    port: parseInt(server.port, 10) || (server.protocol === 'https:' ? 443 : 80)
  };
}
function normalizeServer ( server ) { // normalize hostname if ( ! reProtocol . test ( server ) ) { server = 'http://' + server ; } server = url . parse ( server ) ; return { protocol : server . protocol , hostname : server . hostname , auth : server . auth , pathname : server . pathname , port : parseInt ( server . port , 10 ) || ( server . protocol === 'https:' ? 443 : 80 ) } ; }
Normalize server config
Normalize server config