Bump to v4.11.0.

This commit is contained in:
John-David Dalton
2016-04-12 22:18:39 -07:00
parent 76b289fe6e
commit 63d9a3fc42
23 changed files with 250 additions and 126 deletions

View File

@@ -1,4 +1,4 @@
define(['./_copyObjectWith'], function(copyObjectWith) {
define(['./_assignValue'], function(assignValue) {
/**
* Copies properties of `source` to `object`.
@@ -7,10 +7,25 @@ define(['./_copyObjectWith'], function(copyObjectWith) {
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object) {
return copyObjectWith(source, props, object);
function copyObject(source, props, object, customizer) {
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: source[key];
assignValue(object, key, newValue);
}
return object;
}
return copyObject;