just like _.merge but use a diff object to overwrite or delete properties of object a deletes properties whose value in the diff === undefined (apply the tombstone)
553530
function mergeDiff(a, diff) {
  var key, val;
  if (a && diff) {
    for (key in diff) { if (diff.hasOwnProperty(key)) {
      val = diff[key];
      if (val === undefined) {
        delete a[key];
      } else {
        a[key] = val;
      }
    }}
  }
  return a;
}
968930
function merge (target, src) {
        var dst = {};

        if (target && typeof target === 'object') {
            Object.keys(target).forEach(function (key) {
                dst[key] = target[key];
            });
        }
        Object.keys(src).forEach(function (key) {
            if (typeof src[key] !== 'object' || !src[key]) {
                dst[key] = src[key];
            } else {
                if (!target[key]) {
                    dst[key] = src[key];
                } else {
                    dst[key] = merge(target[key], src[key]);
                }
            }
        });

        return dst;
    }
1103662
function _merge(o1, o2) {
    Object.keys(o2).forEach(function (k) {
        if (o1[k] === undefined) {
            o1[k] = o2[k];
        } else {
            if ((typeof (o1[k])) === 'object') {
                _merge(o1[k], o2[k]);
            } else { // Last property wins!
                o1[k] = o2[k];
            }
        }
    });
}
1189918
function mergeOne(dst, src) {
    if (src === _undefined) return dst;

    // According to specification arrays must be concatenated.
    // Also, the '.concat' creates a new array instance. Overrides the 'dst'.
    if (isArray(src)) return (isArray(dst) ? dst : []).concat(src);

    // Now deal with non plain 'src' object. 'src' overrides 'dst'
    // Note that functions are also assigned! We do not deep merge functions.
    if (!isPlainObject(src)) return src;

    var keys = objectKeys(src), i = 0, key;
    for (; i < keys[_length];) {
      key = keys[i++];

      // Do not merge properties with the '_undefined' value.
      if (src[key] !== _undefined) {
        // deep merge each property. Recursion!
        dst[key] = mergeOne(
          // Recursive calls to mergeOne() must allow only plain objects or arrays in dst
          isPlainObject(dst[key]) || isArray(src[key]) ? dst[key] : {},
          src[key]
        );
      }
    }

    return dst;
  }
164500
function ObjectDiff () {
  var self = this

  self.klass = ObjectDiff;
  self.klass.super_.apply(self, arguments);

  self.engine = require('objectdiff');
}
62823
function replace (obj, key, val) {
  if (obj.hasOwnProperty(key)) obj[key] = val;
  return obj;
}
617147
function mergeObjectsInGecko(origin, add, opts) {
    "use strict";

    var options = opts || {},
        keepReferences = options.keepReferences;

    for (var p in add) {
        if (isPlainObject(add[p])) {
            if (isPlainObject(origin[p])) {
                origin[p] = mergeObjects(origin[p], add[p]);
            } else {
                origin[p] = keepReferences ? add[p] : clone(add[p]);
            }
        } else {
            // if a property is only a getter, we could have a Javascript error
            // in strict mode "TypeError: setting a property that has only a getter"
            // when setting the value to the new object (gecko 25+).
            // To avoid it, let's define the property on the new object, do not set
            // directly the value
            var prop = Object.getOwnPropertyDescriptor(add, p);
            if (prop.get && !prop.set) {
                Object.defineProperty(origin, p, prop);
            }
            else {
                origin[p] = add[p];
            }
        }
    }
    return origin;
}
932950
def merge!(pairs, options={})
      expires = expires_at(options)
      options = Utils.without(options, :expires)

      block = if block_given?
                lambda do |key, old_entry, entry|
                  old_entry = invalidate_entry(key, old_entry)
                  if old_entry.nil?
                    entry # behave as if no replace is happening
                  else
                    old_value, _ = old_entry
                    new_value, _ = entry
                    new_entry(yield(key, old_value, new_value), expires)
                  end
                end
              end

      entry_pairs = pairs.map do |key, value|
        [key, new_entry(value, expires)]
      end
      @adapter.merge!(entry_pairs, options, &block)
      self
    end
909456
function applyReplacer (value, replacer) {
  if (typeof replacer === 'function') {
    const input = {
      '': value
    }
    return applyFunctionReplacer(input, replacer)['']
  }

  if (
    isArray(replacer)
    // Array replacer only works for plain object
    && isPlainObject(value)
  ) {
    return applyFunctionReplacer(value, (k, v) => ~ replacer.indexOf(k)
      ? v
      : undefined)
  }

  return value
}
968142
function patch(obj, properties) {
  var old = {};
  for (var name in properties) {
    old[name] = obj[name];
    obj[name] = properties[name];
  }
  return old;
}
393040
function merge(_old, _new) {
        for (var i in _new) {
            if (_new.hasOwnProperty(i)) {
                _old[i] = _new[i];
            }
        }
        return _old;
    }
1131010
function decorate(obj) {
    utils.define(obj, 'merge', function() {
      var args = [].concat.apply([], [].slice.call(arguments));
      var len = args.length;
      var idx = -1;

      while (++idx < len) {
        var val = args[idx];
        if (!utils.isObject(val)) continue;
        if (val.hasOwnProperty('hash')) {
          // shallow clone and delete the `data` object
          val = utils.merge({}, val, val.hash);
          delete val.data;
        }
        utils.merge(obj, val);
      }
      // ensure methods aren't overwritten
      decorate(obj);
      if (obj.hasOwnProperty('app') && obj.hasOwnProperty('options')) {
        decorate(obj.options);
      }
      return obj;
    });

    utils.define(obj, 'get', function(prop) {
      return utils.get(obj, prop);
    });

    utils.define(obj, 'set', function(key, val) {
      return utils.set(obj, key, val);
    });
  }
37306
function diff( a, b ) {
	var result = a.slice();
	for ( var i = 0; i < result.length; i++ ) {
		for ( var j = 0; j < b.length; j++ ) {
			if ( result[i] === b[j] ) {
				result.splice(i, 1);
				i--;
				break;
			}
		}
	}
	return result;
}
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;
    }
}
813738
function mergeJson(original, override) {
            return _.merge(original, override, function (a, b, key, aParent, bParent) {
                if (_.isUndefined(b)) {
                    aParent[key] = undefined;
                    return;
                }
            });
        }
794630
function copyOwnProperties(src, dst, overwrite) {
  var names = Object.getOwnPropertyNames(src);
  var i, l, name;
  for (i = 0, l = names.length; i < l; i++) {
    name = names[i];
    if (!dst.hasOwnProperty(name) || overwrite) {
      var descriptor = Object.getOwnPropertyDescriptor(src, name);
      Object.defineProperty(dst, name, descriptor);
    }
  }
  return dst;
}
496993
function merge (obj1, obj2) {
  var c = {},
    keys = Object.keys(obj2),
    i;

  for (i = 0; i !== keys.length; i++) {
    c[keys[i]] = obj2[keys[i]];
  }

  keys = Object.keys(obj1);
  for (i = 0; i !== keys.length; i++) {
    if (!c.hasOwnProperty(keys[i])) {
      c[keys[i]] = obj1[keys[i]];
    }
  }

  return c;
}