js/src/core/options.js
function _mergeOpts(allOptions, childFieldName) {
  var finalOpts = {};
  allOptions = _normalizeOpts(allOptions);
  var name;

  for (name in allOptions) {
    if (name !== childFieldName) {
      finalOpts[name] = allOptions[name];
    }
  }

  //merge in the per type settings for the childFieldName
  if (childFieldName && allOptions[childFieldName]) {
    for (name in allOptions[childFieldName]) {
      finalOpts[name] = allOptions[childFieldName][name];
    }
  }
  return finalOpts;
}
function _mergeOpts(allOptions, childFieldName) {
  var finalOpts = {};
  allOptions = _normalizeOpts(allOptions);
  var name;

  for (name in allOptions) {
    if (name !== childFieldName) {
      finalOpts[name] = allOptions[name];
    }
  }

  //merge in the per type settings for the childFieldName
  if (childFieldName && allOptions[childFieldName]) {
    for (name in allOptions[childFieldName]) {
      finalOpts[name] = allOptions[childFieldName][name];
    }
  }
  return finalOpts;
}
function _mergeOpts ( allOptions , childFieldName ) { var finalOpts = { } ; allOptions = _normalizeOpts ( allOptions ) ; var name ; for ( name in allOptions ) { if ( name !== childFieldName ) { finalOpts [ name ] = allOptions [ name ] ; } } //merge in the per type settings for the childFieldName if ( childFieldName && allOptions [ childFieldName ] ) { for ( name in allOptions [ childFieldName ] ) { finalOpts [ name ] = allOptions [ childFieldName ] [ name ] ; } } return finalOpts ; }
merges child options up with the parent options object Example: obj = {a: 1, b: {a: 2}} mergeOpts(obj, 'b')  Returns: {a: 2}
merges child options up with the parent options object Example : obj = { a : 1 b : { a : 2 }} mergeOpts ( obj b ) Returns : { a : 2 }