lib/endpoints.js
function getPathHostName(origin, path) {
  const pathOverride = {
    '/oauth/userinfo': `https://${origin}.battle.net`,
  };

  return Object.prototype.hasOwnProperty.call(pathOverride, path) ? pathOverride[path] : endpoints[origin].hostname;
}
function getPathHostName(origin, path) {
  const pathOverride = {
    '/oauth/userinfo': `https://${origin}.battle.net`,
  };

  return Object.prototype.hasOwnProperty.call(pathOverride, path) ? pathOverride[path] : endpoints[origin].hostname;
}
function getPathHostName ( origin , path ) { const pathOverride = { '/oauth/userinfo' : ` ${ origin } ` , } ; return Object . prototype . hasOwnProperty . call ( pathOverride , path ) ? pathOverride [ path ] : endpoints [ origin ] . hostname ; }
Get the hostname of a path that may be overridden.

@param {String} origin A regional origin
@param {String} [path] The requested API path
@return {String} The valid hostname for the current path
Get the hostname of a path that may be overridden .