Extend an object with more objects
176345
function() {
            var args = slice.call(arguments);
            var object = args.shift();

            for (var i = 0, l = args.length; i < l; i++) {
                var props = args[i];
                for (var key in props) {
                    object[key] = props[key];
                }
            }

            return object;
        }
1249895
function extend(x, y){
    for(var key in y) {
        if (y.hasOwnProperty(key)) {
            x[key] = y[key];
        }
    }
    return x;
}
1053489
function extend(dest, src) {
    var result = dest;
    for(var n in src) {
        result[n] = src[n];
    }
    return result;
}
34561
def append_with(self, obj, **properties):
        ''''''
        for prop, val in properties.items():
            val = self.serialize(val)
            self._meta.setdefault(prop, {}).setdefault(val, []).append(obj)
        self.append(obj)
150067
function extend(obj) {
        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
            args[_key - 1] = arguments[_key];
        }

        if (validateHelpers.isObject(obj) && args.length > 0) {
            if (Object.assign) {
                return Object.assign.apply(Object, [obj].concat(toConsumableArray(args)));
            }

            args.forEach(function (arg) {
                if (validateHelpers.isObject(arg)) {
                    Object.keys(arg).forEach(function (key) {
                        obj[key] = arg[key];
                    });
                }
            });
        }

        return obj;
    }
1239649
function extend(helper = {}) {
  Object.keys(plugins).forEach((key) => {
    const plugin = plugins[key]
    helper[key] = plugin.default.bind(helper)
  })
  helper.extend = (name, method) => {
    helper[name] = method.bind(helper)
  }
}
837229
def extend(self, *args, **kwargs):
        
        if len(args) > 1:
            raise TypeError("extend() takes at most 1 positional "
                            "arguments ({0} given)".format(len(args)))
        other = args[0] if len(args) >= 1 else ()

        if isinstance(other, HTTPHeaderDict):
            for key, val in other.iteritems():
                self.add(key, val)
        elif isinstance(other, Mapping):
            for key in other:
                self.add(key, other[key])
        elif hasattr(other, "keys"):
            for key in other.keys():
                self.add(key, other[key])
        else:
            for key, value in other:
                self.add(key, value)

        for key, value in kwargs.items():
            self.add(key, value)
818957
function expandItem(data) {
    // Cloning to avoid modification of the original data item.
    data = JSON.parse(JSON.stringify(data));

    if (!data.expansions) {
        data.expansions = [];
    }

    // Expansions are stored in a tree structure.
    let obj = findExpansion.call(this, data.parent);
    obj.expansions.push(data);
}
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;
}
1149255
function extend(a, b) {
    var rec = function(a, b) {
        var i;
        for(i in b) {
            a[i] = b[i];
        }
        return a;
    };
    return rec(rec({}, a), b);
}
803380
function extend(source, target, deep) {
    if (deep) {
        return lodash.merge(lodash.cloneDeep(source), target);
    } else {
        return lodash.assignIn(source, target);
    }
}
660387
function extend(o) {
  if (typeOf(o) !== 'object') { return {}; }
  var args = arguments;
  var len = args.length - 1;

  for (var i = 0; i < len; i++) {
    var obj = args[i + 1];

    if (typeOf(obj) === 'object' && typeOf(obj) !== 'regexp') {
      for (var key in obj) {
        if (obj.hasOwnProperty(key)) {
          o[key] = obj[key];
        }
      }
    }
  }
  return o;
}
593105
def extend(self, *args):
        
        args = list(args)
        for i in args:
            self.obj.update(i)

        return self._wrap(self.obj)
961765
def extend(a: dict, b: dict) -> dict:
    """"""
    res = a.copy()
    res.update(b)
    return res
1356574
function extend() {
    var i,
        k,
        res = {},
        l = arguments.length;

    for (i = l - 1; i >= 0; i--)
      for (k in arguments[i])
        if (res[k] && isPlainObject(arguments[i][k]))
          res[k] = extend(arguments[i][k], res[k]);
        else
          res[k] = arguments[i][k];

    return res;
  }
476870
function extend(obj /*, obj2, obj3, ... */) {
    var extensions = Array.prototype.slice.call(arguments, 1);
    extensions.forEach(function(extension) {
        var properties = Object.keys(extension);
        properties.forEach(function(property) {
            obj[property] = extension[property];
        });
    });
    return obj;
}
254162
function extend(obj) {
  var slice = Array.prototype.slice;

  slice.call(arguments, 1).forEach(function(source) {
    var getter
      , setter;

    for (var key in source) {
      getter = source.__lookupGetter__(key);
      setter = source.__lookupSetter__(key);

      if (getter || setter) {
        getter && obj.__defineGetter__(key, getter);
        setter && obj.__defineSetter__(key, setter);
      }

      else {
        obj[key] = source[key];
      }
    }
  });

  return obj;
}