PHP 8.2.30
Preview: merge.js Size: 1.67 KB
//opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules/cli-table2/node_modules/lodash/object/merge.js

var baseMerge = require('../internal/baseMerge'),
    createAssigner = require('../internal/createAssigner');

/**
 * Recursively merges own enumerable properties of the source object(s), that
 * don't resolve to `undefined` into the destination object. Subsequent sources
 * overwrite property assignments of previous sources. If `customizer` is
 * provided it's invoked to produce the merged values of the destination and
 * source properties. If `customizer` returns `undefined` merging is handled
 * by the method instead. The `customizer` is bound to `thisArg` and invoked
 * with five arguments: (objectValue, sourceValue, key, object, source).
 *
 * @static
 * @memberOf _
 * @category Object
 * @param {Object} object The destination object.
 * @param {...Object} [sources] The source objects.
 * @param {Function} [customizer] The function to customize assigned values.
 * @param {*} [thisArg] The `this` binding of `customizer`.
 * @returns {Object} Returns `object`.
 * @example
 *
 * var users = {
 *   'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
 * };
 *
 * var ages = {
 *   'data': [{ 'age': 36 }, { 'age': 40 }]
 * };
 *
 * _.merge(users, ages);
 * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
 *
 * // using a customizer callback
 * var object = {
 *   'fruits': ['apple'],
 *   'vegetables': ['beet']
 * };
 *
 * var other = {
 *   'fruits': ['banana'],
 *   'vegetables': ['carrot']
 * };
 *
 * _.merge(object, other, function(a, b) {
 *   if (_.isArray(a)) {
 *     return a.concat(b);
 *   }
 * });
 * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
 */
var merge = createAssigner(baseMerge);

module.exports = merge;

Directory Contents

Dirs: 0 × Files: 29

Name Size Perms Modified Actions
1.58 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.24 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
835 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
745 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
38 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.78 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.79 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
980 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
840 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
975 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
844 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
575 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
951 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.56 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.54 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.27 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.62 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
781 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.57 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.67 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
41 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.56 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
800 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.47 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.54 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
1.36 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
2.10 KB lrw-r--r-- 2021-09-28 11:28:33
Edit Download
691 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download
681 B lrw-r--r-- 2021-09-28 11:28:33
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).