lib/utils.js
function(tokenService, domainPrefix) {
  var tokenUrl = tokenService.replace(/\{DOMAIN_PREFIX\}/, domainPrefix);
  log.debug('token Url: '+ tokenUrl);
  return tokenUrl;
}
function(tokenService, domainPrefix) {
  var tokenUrl = tokenService.replace(/\{DOMAIN_PREFIX\}/, domainPrefix);
  log.debug('token Url: '+ tokenUrl);
  return tokenUrl;
}
function ( tokenService , domainPrefix ) { var tokenUrl = tokenService . replace ( / \{DOMAIN_PREFIX\} / , domainPrefix ) ; log . debug ( 'token Url: ' + tokenUrl ) ; return tokenUrl ; }
If tokenService already has a domainPrefix set because the API consumer passed in a full URL
instead of a substitutable one ... then the replace acts as a no-op.

@param tokenService
@param domain_prefix
@returns {*|XML|string|void}
If tokenService already has a domainPrefix set because the API consumer passed in a full URL instead of a substitutable one ... then the replace acts as a no - op .