Helper method to merge nested objects
@private
192335
function mergeOptions(base, custom) {
  return Object.assign({}, defaultOptions, base, custom, {
    open: Object.assign({}, defaultOptions.open, base.open, custom.open),
    send: Object.assign({}, defaultOptions.send, base.send, custom.send),
  })
}
449609
function merge ( obj1, obj2 ) {
    var args = argsToArray( arguments ), res;
    if ( 0 === args.length ) return {};
    if ( 1 === args.length ) return obj1;
    if ( 2 === args.length ) return mergeTwo( obj1, obj2 );

    // More then two objects
    res  = mergeTwo( obj1, obj2 );
    args = args.slice( 2 );

    while ( args.length ) {
        res = mergeTwo( res, args[ 0 ] );
        args = args.slice( 1 );
    }

    return res;

    function mergeTwo ( obj1, obj2 ) {
        if ( !isDefined( obj1 ) ) return obj2;
        if ( !isDefined( obj2 ) ) return obj1;

        for (var key in obj2) {
            obj1[ key ] = obj2[ key ];
        }

        return obj1;
    }
}
82800
function clone(obj1, obj2, index) {
  index = index || 0;
  for (var i in obj2) {
    if ('object' == typeof i) obj1[i] = recursiveMerge(obj1[i], obj2[i], index++);
    else obj1[i] = obj2[i];
  }
  return obj1;
}
607881
def merge(obj_a, obj_b, strategy='smart', renderer='yaml', merge_lists=False):
    '''
    
    '''
    return salt.utils.dictupdate.merge(obj_a, obj_b, strategy, renderer,
            merge_lists)
557397
function ( obj, arg ) {
		utility.iterate( arg, function ( v, k ) {
			if ( ( obj[k] instanceof Array ) && ( v instanceof Array ) ) {
				array.merge( obj[k], v );
			}
			else if ( ( obj[k] instanceof Object ) && ( v instanceof Object ) ) {
				utility.iterate( v, function ( x, y ) {
					obj[k][y] = utility.clone( x );
				});
			}
			else {
				obj[k] = utility.clone( v );
			}
		});

		return obj;
	}
201429
function mergeObjects(a, b) {
    var r = { };
    for (var k in a)
        r[k] = a[k];
    for (var k in b)
        r[k] = b[k];
    return r;
}
238252
def _merge_objects(tref, merged, obj):
    
    size = None
    for (timestamp, tsize) in obj.snapshots:
        if timestamp == tref:
            size = tsize
    if size:
        _merge_asized(merged, size)
756544
function merge(obj1, obj2)
{
    var obj3 = {}, index;
    for (index in obj1) {
        obj3[index] = obj1[index];
    }
    for (index in obj2) {
        obj3[index] = obj2[index];
    }
    return obj3;
}
1283840
def merge(a, b):
    ""
    for key in b:
        if isinstance(a.get(key), dict) and isinstance(b.get(key), dict):
            merge(a[key], b[key])
        else:
            a[key] = b[key]
    return a
1348783
function (target, source) {
        'use strict';
        var keys = Object.keys(source),
            len = keys.length,
            i = 0,
            prop,
            isA, isB;
        while (i < len) {
            prop = keys[i];
            isA = isObj(target[prop]);
            isB = isObj(source[prop]);
            if (isA && isB) {
                deepMerge(target[prop], source[prop]);
            } else if (!isA && isB) {
                target[prop] = JSON.parse(JSON.stringify(source[prop]));
            } else {
                target[prop] = source[prop];
            }
            i += 1;
        }
    }
222463
function merge(defaultObject, objectToMerge) {
		var key;
		if (!objectToMerge) {
			return defaultObject;
		}

		for (key in objectToMerge) {
			defaultObject[key] = objectToMerge[key];
		}

		return defaultObject;
	}
692223
function merge(dest) {
  if (dest) {
    Array.prototype.slice.call(arguments, 1).forEach(function(arg) {
      Object.keys(arg).forEach(function(key) {
        dest[key] = arg[key]
      })
    })
  }

  return dest
}
900920
def merge(self, obj):
        
        for attribute in dir(obj):
            if '__' in attribute:
                continue
            setattr(self, attribute, getattr(obj, attribute))
801283
function merge(Obj1, Obj2) {
    if (typeof Obj1 != 'object') {
        return {};
    }
    if (typeof Obj2 != 'object') {
        return Obj1;
    }
    for (var index in Obj2) {
        if (Obj2.hasOwnProperty(index)) {
            Obj1[index] = Obj2[index];
        }
    }

    return Obj1;
}
1032069
function merge(parent, key, val){
  if (~indexOf(key, ']')) {
    var parts = key.split('[')
      , len = parts.length
      , last = len - 1;
    parse(parts, parent, 'base', val);
    // optimize
  } else {
    if (!isint.test(key) && isArray(parent.base)) {
      var t = {};
      for (var k in parent.base) t[k] = parent.base[k];
      parent.base = t;
    }
    set(parent.base, key, val);
  }

  return parent;
}
763539
function mergeDeep (target, source) {
  let dummy;

  if (isObject(target) && isObject(source)) {
    for (const key in source) {
      if (isObject(source[key])) {
        if (!target[key]) {
          dummy = {};
          dummy[key] = {};
          objectAssign(target, dummy);
        }
        mergeDeep(target[key], source[key]);
      } else {
        dummy = {};
        dummy[key] = source[key];
        objectAssign(target, dummy);
      }
    }
  }
  return target;
}
723197
function mergeArrays(objValue, srcValue) {
  if (isArray(objValue) && isArray(srcValue)) {
    return objValue.concat(srcValue)
  }
}