Combines the keys of two objects

@param {Object} a
@param {Object} b
@returns {Object}
357472
function keyUnion(a, b) {

    var k = {};
    for (var i in a) {
      k[i] = 1;
    }
    for (var i in b) {
      k[i] = 1;
    }
    return k;
  }
658638
function mixin(a, b) {
  Object.keys(b).forEach(function(key) {
    a[key] = b[key];
  });
}
1091746
function cloneObj(a,b) {
  Object.keys(b).forEach(function(k) {
    a[k] = b[k];
  });
  return a;
}
822174
def merge_recursive(obj_a, obj_b, level=False):
    '''
    
    '''
    return aggregate(obj_a, obj_b, level,
                     map_class=AggregatedMap,
                     sequence_class=AggregatedSequence)
1268433
function concat(a, b) {
  if (a.concat) { // Is `a` an Array?
    return a.concat(b);
  }
  if (a instanceof Blob) {
    return new Blob([a,b], {type: a.type});
  }
  if (a.set) { // Is `a` a typed array?
    var c = new a.constructor(a.length + b.length);
    c.set(a);
    c.set(b, a.length);
    return c;
  }
  throw new Error("Unknown data type");
}
756707
function add(out, a, b) {
  out[0] = a[0] + b[0];
  out[1] = a[1] + b[1];
  out[2] = a[2] + b[2];
  return out;
}
151016
def _merge_a_into_b(self, a, b):
        
        from easydict import EasyDict as edict
        if type(a) is not edict:
            return

        for k, v in a.items():
            # a must specify keys that are in b
            if k not in b:
                raise KeyError('{} is not a valid config key'.format(k))

            # the types must match, too
            old_type = type(b[k])
            if old_type is not type(v):
                if isinstance(b[k], np.ndarray):
                    v = np.array(v, dtype=b[k].dtype)
                else:
                    raise ValueError(('Type mismatch ({} vs. {}) '
                                      'for config key: {}').format(type(b[k]),
                                                                   type(v), k))

            # recursively merge dicts
            if type(v) is edict:
                try:
                    self._merge_a_into_b(a[k], b[k])
                except:
                    print('Error under config key: {}'.format(k))
                    raise
            else:
                b[k] = v
        return b
674636
function mixCopy(to, from)
{
  var keys = Object.keys(from)
    , i    = keys.length
    ;

  while (i-- > 0)
  {
    to[keys[i]] = from[keys[i]];
  }

  return to;
}
907350
function concatTo(obj, key, val) {
    obj[key] = obj[key] || [];
    obj[key] = obj[key].concat(val);
    return obj[key];
}
1263790
function merge(objectA, objectB) {
	for (var attrName in objectB) {
		if (objectB.hasOwnProperty(attrName)) {
			if (objectA.hasOwnProperty(attrName) && objectA[attrName] instanceof Object && objectB.hasOwnProperty(attrName) && objectB[attrName] instanceof Object) {
				objectA[attrName] = merge(objectA[attrName], objectB[attrName]);
			}
			else {
				objectA[attrName] = objectB[attrName];
			}
		}
	}
	return objectA;
}
269169
function (a, b) {
  if (a) {
    if (Array.isArray(b)) {
      for (var i = 0; i < b.length; i++) {
        if (b[i]) {
          a[i] = extend(a[i], b[i]);
        }
      }
      return a;
    } else if (typeof b === 'object') {
      Object.getOwnPropertyNames(b).forEach(function (key) {
        a[key] = extend(a[key], b[key]);
      });
      return a;
    }
  }
  return b;
}
529662
function mergeArrays (a, b) {
    // if target is array then add b to array otherwise return undefined
    // so normal _.merge will be performed
    return Array.isArray(a) ? a.concat(b) : undefined
}
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;
}
522289
function (obj1, obj2, overwrite) {
        if (obj1 === undefined || obj1 === null) { return obj2; };
        if (obj2 === undefined || obj2 === null) { return obj1; };

        var obj1Type = external.is(obj1).getType();
        var obj2Type = external.is(obj2).getType();

        var exceptionMsg;
        if (acceptableForObj1.indexOf(obj1Type) === -1 || acceptableForObj2.indexOf(obj2Type) === -1) {
            exceptionMsg = "msngr.merge() - Only objects, arrays or a single function followed by objects can be merged!";
        }

        if ([obj1Type, obj2Type].indexOf(internal.types.array) !== -1 && (obj1Type !== internal.types.array || obj2Type !== internal.types.array)) {
            exceptionMsg = "msngr.merge() - Arrays cannot be merged with objects or functions!";
        }

        if (overwrite === true) {
            return obj2;
        }

        if (exceptionMsg) {
            throw new Error(exceptionMsg);
        }

        var result = obj1;

        // If we're in the weird spot of getting only arrays then concat and return
        // Seriously though, Mr or Mrs or Ms dev, just use Array.prototype.concat()!
        if (obj1Type === internal.types.array && obj2Type === internal.types.array) {
            return obj1.concat(obj2);
        }

        for (var key in obj2) {
            if (obj2.hasOwnProperty(key)) {
                var is = external.is(obj2[key]);
                if (is.object) {
                    result[key] = result[key] || { };
                    result[key] = twoMerge(result[key], obj2[key]);
                } else if (is.array) {
                    result[key] = result[key] || [];
                    result[key] = result[key].concat(obj2[key]);
                } else {
                    result[key] = obj2[key];
                }
            }
        }

        return result;
    }
433137
function(items, obj1, obj2, obj3) {
		items = _.reduce(_.filter(_.pairs(items), 
			function(pair) { 
				return typeof pair[1] !== 'undefined';
			}),
			function(target, pair) { 
				target[pair[0]] = pair[1];
				return target;
			}, {}) || {};

		return _.extend.apply(null, [items].concat(_.rest(arguments)));
	}
930294
def dictionary_merge(a, b):
    
    for key, value in b.items():
        if key in a and isinstance(a[key], dict) and isinstance(value, dict):
            dictionary_merge(a[key], b[key])
            continue
        a[key] = b[key]
    return a
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;
}