node_modules/router/index.js
/**
 * Merge params with parent params
 *
 * @private
 */
Merge params with parent params
@private
Merge params with parent params @private
function mergeParams(params, parent) {
  if (typeof parent !== 'object' || !parent) {
    return params
  }
  var obj = mixin({}, parent)
  if (!(0 in params) || !(0 in parent)) {
    return mixin(obj, params)
  }
  var i = 0
  var o = 0
  while (i in params) {
    i++
  }
  while (o in parent) {
    o++
  }
  for (i--; i >= 0; i--) {
    params[i + o] = params[i]
    if (i < o) {
      delete params[i]
    }
  }
  return mixin(obj, params)
}
function mergeParams ( params , parent ) { if ( typeof parent !== 'object' || ! parent ) { return params } var obj = mixin ( { } , parent ) if ( ! ( 0 in params ) || ! ( 0 in parent ) ) { return mixin ( obj , params ) } var i = 0 var o = 0 while ( i in params ) { i ++ } while ( o in parent ) { o ++ } for ( i -- ; i >= 0 ; i -- ) { params [ i + o ] = params [ i ] if ( i < o ) { delete params [ i ] } } return mixin ( obj , params ) }
Merge params with parent params
 @private
Merge params with parent params @private
// make copy of parent for base // simple non-numeric merging // determine numeric gap in params // determine numeric gap in parent // offset numeric indices in params before merge // create holes for the merge when necessary