1 var forOwn = require('./forOwn');
2 var isPlainObject = require('../lang/isPlainObject');
5 * Deeply copy missing properties in the target from the defaults.
7 function deepFillIn(target, defaults){
15 // jshint loopfunc: true
16 forOwn(obj, function(newValue, key) {
17 var curValue = target[key];
18 if (curValue == null) {
19 target[key] = newValue;
20 } else if (isPlainObject(curValue) &&
21 isPlainObject(newValue)) {
22 deepFillIn(curValue, newValue);
31 module.exports = deepFillIn;