mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
merging ratbeard's patch for allowing multiple arguments to be passed to extend, with docs
This commit is contained in:
@@ -432,11 +432,10 @@
|
||||
return _.filter(_.keys(obj), function(key){ return _.isFunction(obj[key]); }).sort();
|
||||
};
|
||||
|
||||
// Extend a given object with all the properties in given object(s)
|
||||
// Extend a given object with all the properties in passed-in object(s).
|
||||
_.extend = function(obj) {
|
||||
var prop;
|
||||
each(_.rest(arguments), function (source) {
|
||||
for (prop in source) obj[prop] = source[prop];
|
||||
each(_.rest(arguments), function(source) {
|
||||
for (var prop in source) obj[prop] = source[prop];
|
||||
});
|
||||
return obj;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user