Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) {
/**
* Deeply copy missing properties in the target from the defaults.
*/
function deepFillIn(target, defaults){
var i = 0,
n = arguments.length,
obj;
while(++i < n) {
obj = arguments[i];
if (obj) {
// jshint loopfunc: true
forOwn(obj, function(newValue, key) {
var curValue = target[key];
if (curValue == null) {
target[key] = newValue;
} else if (isPlainObject(curValue) &&
isPlainObject(newValue)) {
deepFillIn(curValue, newValue);
}
});
}
}
return target;
}
return deepFillIn;
});