function buildRoute({ serviceBaseUrl, withTenant, withFeed }) {
  let result
  if (withTenant) {
    result = new RouteBuilder().push(`(?:(.+)\\.)?${serviceBaseUrl}`, 'tenant')
  } else {
    result = new RouteBuilder({ base: serviceBaseUrl })
  }
  if (withFeed) {
    result.push('([^/]+)', 'feed')
  }
  return result
}
function buildRoute({ serviceBaseUrl, withTenant, withFeed }) {
  let result
  if (withTenant) {
    result = new RouteBuilder().push(`(?:(.+)\\.)?${serviceBaseUrl}`, 'tenant')
  } else {
    result = new RouteBuilder({ base: serviceBaseUrl })
  }
  if (withFeed) {
    result.push('([^/]+)', 'feed')
  }
  return result
}
function buildRoute ( { serviceBaseUrl , withTenant , withFeed } ) { let result if ( withTenant ) { result = new RouteBuilder ( ) . push ( ` \\ ${ serviceBaseUrl } ` , 'tenant' ) } else { result = new RouteBuilder ( { base : serviceBaseUrl } ) } if ( withFeed ) { result . push ( '([^/]+)' , 'feed' ) } return result }
/*
Build the Shields service URL object for the given service configuration. Return
the RouteBuilder instance to which the service can add the route.
/ * Build the Shields service URL object for the given service configuration . Return the RouteBuilder instance to which the service can add the route .
Build a route from a service base url and optional parameters