Do a deep merge of two objects. Only non-Array objects are merged. Arrays are *not* merged.
548902
function merge (src, dest) {
  if (src != null &&
        dest != null &&
        !Array.isArray(src) &&
        !Array.isArray(dest) &&
        typeof src === 'object' &&
        typeof dest === 'object') {
    Object.getOwnPropertyNames(src)
            .forEach(function (prop) {
              var descriptor = Object.getOwnPropertyDescriptor(src, prop);
              descriptor.value = merge(descriptor.value, dest[prop]);
              Object.defineProperty(dest, prop, descriptor);
            });

    return dest;
  }

  return src;
}
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;
}
822174
def merge_recursive(obj_a, obj_b, level=False):
    '''
    
    '''
    return aggregate(obj_a, obj_b, level,
                     map_class=AggregatedMap,
                     sequence_class=AggregatedSequence)
250385
def merge(self, other):
        """"""
        log.debug('Merging: %s and %s' % (self.serialize(), other.serialize()))
        for k in self.keys():
            for new_item in other[k]:
                if new_item not in self[k]:
                    self[k].append(new_item)
        log.debug('Result: %s' % self.serialize())
        return self
967911
def object_merge(old, new, unique=False):
    
    if isinstance(old, list) and isinstance(new, list):
        if old == new:
            return
        for item in old[::-1]:
            if unique and item in new:
                continue
            new.insert(0, item)
    if isinstance(old, dict) and isinstance(new, dict):
        for key, value in old.items():
            if key not in new:
                new[key] = value
            else:
                object_merge(value, new[key])
1096164
def merge(*maps):
    """"""
    copies = map(deepcopy, maps)
    return reduce(lambda acc, val: acc.update(val) or acc, copies)
122665
def deep_merge(h)
      self.merge(h) do |key, v1, v2|
        if v1.is_a?(::Hash) && v2.is_a?(Sycl::Hash)
          self[key].deep_merge(v2)
        elsif v1.is_a?(::Hash) && v2.is_a?(::Hash)
          self[key].deep_merge(Sycl::Hash.from_hash(v2))
        else
          self[key] = Sycl::from_object(v2)
        end
      end
    end
298010
def merge(self, other, replacements=None):
        

        # TODO: is the current solution not optimal enough?
        for _, item in other._storage.items():  # type: RegionObject
            for so in item.stored_objects:  # type: StoredObject
                if replacements and so.obj in replacements:
                    so = StoredObject(so.start, replacements[so.obj], so.size)
                self._object_mapping[so.obj_id] = so
                self.__store(so, overwrite=False)

        return self
890188
def merge(self, other):
        """"""
        for key, value in other.items():
            if key in self and (isinstance(self[key], Compound)
                                and isinstance(value, dict)):
                self[key].merge(value)
            else:
                self[key] = value
1173837
def _deep_merge_dict(a, b):
    """"""
    for k, v in b.items():
        if k in a and isinstance(a[k], dict) and isinstance(v, dict):
            _deep_merge_dict(a[k], v)
        else:
            a[k] = v
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
}
181694
function mergeInto(one, two) {
  checkMergeObjectArg(one);
  if (two != null) {
    checkMergeObjectArg(two);
    for (var key in two) {
      if (!two.hasOwnProperty(key)) {
        continue;
      }
      one[key] = two[key];
    }
  }
}
673688
def deep_merge(base, extra):
    
    if extra is None:
        return

    for key, value in extra.items():
        if value is None:
            if key in base:
                del base[key]
        # If the key represents a dict on both given dicts, merge the sub-dicts
        elif isinstance(base.get(key), dict) and isinstance(value, dict):
            deep_merge(base[key], value)
        else:
            # Otherwise, set the key on the base to be the value of the extra.
            base[key] = value
270228
function mergeObjects(obj1, obj2) {

  // Clone object
  var result = JSON.parse(JSON.stringify(obj1));

  for (var p in obj2) {

    if ( obj2[p].constructor === Object ) {

      if (result[p]) {

	result[p] = mergeObjects(result[p], obj2[p]);

	continue;
      }
    } 

    result[p] = obj2[p];
  }

  return result;
}
746215
function merge() {
  var destination = {};
  var sources = [].slice.call(arguments, 0);
  sources.forEach(function(source) {
    var prop;
    for (prop in source) {
      if (prop in destination && Array.isArray(destination[prop])) {
        // Overwrite Arrays
        destination[prop] = source[prop];
      } else if (prop in destination && typeof destination[prop] === "object") {
        // Merge Objects
        destination[prop] = merge(destination[prop], source[prop]);
      } else {
        // Set new values
        destination[prop] = source[prop];
      }
    }
  });
  return destination;
}
192367
function(k, v) {
            var type = objType(v),
                tarType = objType(target[k]);

            if (deep && (type == "array" || type == "object")) {
                target[k] = type == tarType && (tarType == "array" || tarType == "object") ? target[k] : type == "array" ? [] : {};

                //to merge recursively
                jsonQ.merge(deep, target[k], v);
            } else {
                target[k] = v;
            }
        }
1017127
def _perform_merge(self, other):
        
        if len(other.value) > len(self.value):
            self.value = other.value[:]
        return True