defaultsDeep

Object
since 3.10.0

Arguments

  • Object The destination object.
  • ...Object The source objects.

Returns

Object `object`.

This method is like _.defaults except that it recursively assigns default properties.

Note: This method mutates object.

Example of Lodash _.defaultsDeep

_.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
// => { 'a': { 'b': 2, 'c': 3 } }