This method is like `defaults` except that it recursively assigns default properties. **Note:** This method mutates `object`.
defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } })
// => { 'a': { 'b': 2, 'c': 3 } }
Name | Type | Attribute | Description |
---|---|---|---|
object | The destination object. | ||
sources | The source objects. |
{ "comment": "/**\r\n * This method is like `defaults` except that it recursively assigns\r\n * default properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @since 3.10.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see defaults\r\n * @example\r\n *\r\n * defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } })\r\n * // => { 'a': { 'b': 2, 'c': 3 } }\r\n */", "meta": { "range": [ 591, 714 ], "filename": "defaultsDeep.js", "lineno": 21, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo", "code": { "id": "astnode100001684", "name": "defaultsDeep", "type": "FunctionDeclaration", "paramnames": [ "args" ] } }, "description": "This method is like `defaults` except that it recursively assigns\rdefault properties.\r\r**Note:** This method mutates `object`.", "since": "3.10.0", "tags": [ { "originalTitle": "category", "title": "category", "text": "Object", "value": "Object" } ], "params": [ { "type": { "names": [ "Object" ] }, "description": "The destination object.", "name": "object" }, { "type": { "names": [ "Object" ] }, "optional": true, "variable": true, "description": "The source objects.", "name": "sources" } ], "returns": [ { "type": { "names": [ "Object" ] }, "description": "Returns `object`." } ], "see": [ "defaults" ], "examples": [ "defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } })\r// => { 'a': { 'b': 2, 'c': 3 } }" ], "name": "defaultsDeep", "longname": "defaultsDeep", "kind": "function", "scope": "global", "___id": "T000002R000195", "___s": true, "filepath": "defaultsDeep.js" }