lib/index.js
function _normalizeUrl (route, prefix) {
  const _route = Object.assign({}, route)
  const url = _route.url
                 .replace(/^\//, '')
                 .replace(/\/$/, '')

  // build prefix
  prefix = prefix ? `/${prefix}` : ''
  _route.url = url ? `${prefix}/${url}/` : `${prefix}/`

  debug(`rewritting url: ${_route.url}`)

  return _route
}
function _normalizeUrl (route, prefix) {
  const _route = Object.assign({}, route)
  const url = _route.url
                 .replace(/^\//, '')
                 .replace(/\/$/, '')

  // build prefix
  prefix = prefix ? `/${prefix}` : ''
  _route.url = url ? `${prefix}/${url}/` : `${prefix}/`

  debug(`rewritting url: ${_route.url}`)

  return _route
}
function _normalizeUrl ( route , prefix ) { const _route = Object . assign ( { } , route ) const url = _route . url . replace ( / ^\/ / , '' ) . replace ( / \/$ / , '' ) // build prefix prefix = prefix ? ` ${ prefix } ` : '' _route . url = url ? ` ${ prefix } ${ url } ` : ` ${ prefix } ` debug ( ` ${ _route . url } ` ) return _route }
clone and return route object after having normalized url
@param  {Array.<Object>} route    imported route object
@param  {String} prefix  route prefix to be added
@return {Object}
clone and return route object after having normalized url