index.js
function mergeParams(params, parent) {
  if (typeof parent !== 'object' || !parent) {
    return params
  }

  // make copy of parent for base
  var obj = mixin({}, parent)

  // simple non-numeric merging
  if (!(0 in params) || !(0 in parent)) {
    return mixin(obj, params)
  }

  var i = 0
  var o = 0

  // determine numeric gap in params
  while (i in params) {
    i++
  }

  // determine numeric gap in parent
  while (o in parent) {
    o++
  }

  // offset numeric indices in params before merge
  for (i--; i >= 0; i--) {
    params[i + o] = params[i]

    // create holes for the merge when necessary
    if (i < o) {
      delete params[i]
    }
  }

  return mixin(obj, params)
}
function mergeParams(params, parent) {
  if (typeof parent !== 'object' || !parent) {
    return params
  }

  // make copy of parent for base
  var obj = mixin({}, parent)

  // simple non-numeric merging
  if (!(0 in params) || !(0 in parent)) {
    return mixin(obj, params)
  }

  var i = 0
  var o = 0

  // determine numeric gap in params
  while (i in params) {
    i++
  }

  // determine numeric gap in parent
  while (o in parent) {
    o++
  }

  // offset numeric indices in params before merge
  for (i--; i >= 0; i--) {
    params[i + o] = params[i]

    // create holes for the merge when necessary
    if (i < o) {
      delete params[i]
    }
  }

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

@private
Merge params with parent params