Home

constant: mergeWith


  {
    "comment": "/**\r\n * This method is like `merge` except that it accepts `customizer` which\r\n * is invoked to produce the merged values of the destination and source\r\n * properties. If `customizer` returns `undefined`, merging is handled by the\r\n * method instead. The `customizer` is invoked with six arguments:\r\n * (objValue, srcValue, key, object, source, stack).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} customizer The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n *   if (Array.isArray(objValue)) {\r\n *     return objValue.concat(srcValue)\r\n *   }\r\n * }\r\n *\r\n * const object = { 'a': [1], 'b': [2] }\r\n * const other = { 'a': [3], 'b': [4] }\r\n *\r\n * mergeWith(object, other, customizer)\r\n * // => { 'a': [1, 3], 'b': [2, 4] }\r\n */",
    "meta": {
        "range": [
            1111,
            1236
        ],
        "filename": "mergeWith.js",
        "lineno": 33,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
        "code": {
            "id": "astnode100006249",
            "name": "mergeWith",
            "type": "CallExpression",
            "value": ""
        }
    },
    "description": "This method is like `merge` except that it accepts `customizer` which\ris invoked to produce the merged values of the destination and source\rproperties. If `customizer` returns `undefined`, merging is handled by the\rmethod instead. The `customizer` is invoked with six arguments:\r(objValue, srcValue, key, object, source, stack).\r\r**Note:** This method mutates `object`.",
    "since": "4.0.0",
    "tags": [
        {
            "originalTitle": "category",
            "title": "category",
            "text": "Object",
            "value": "Object"
        }
    ],
    "params": [
        {
            "type": {
                "names": [
                    "Object"
                ]
            },
            "description": "The destination object.",
            "name": "object"
        },
        {
            "type": {
                "names": [
                    "Object"
                ]
            },
            "variable": true,
            "description": "The source objects.",
            "name": "sources"
        },
        {
            "type": {
                "names": [
                    "function"
                ]
            },
            "description": "The function to customize assigned values.",
            "name": "customizer"
        }
    ],
    "returns": [
        {
            "type": {
                "names": [
                    "Object"
                ]
            },
            "description": "Returns `object`."
        }
    ],
    "examples": [
        "function customizer(objValue, srcValue) {\r  if (Array.isArray(objValue)) {\r    return objValue.concat(srcValue)\r  }\r}\r\rconst object = { 'a': [1], 'b': [2] }\rconst other = { 'a': [3], 'b': [4] }\r\rmergeWith(object, other, customizer)\r// => { 'a': [1, 3], 'b': [2, 4] }"
    ],
    "name": "mergeWith",
    "longname": "mergeWith",
    "kind": "constant",
    "scope": "global",
    "___id": "T000002R000582",
    "___s": true,
    "filepath": "mergeWith.js"
}