CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
defaultsDeep.js31 linesDownload Raw Back to lodash
1var apply = require('./_apply'),2    baseRest = require('./_baseRest'),3    customDefaultsMerge = require('./_customDefaultsMerge'),4    mergeWith = require('./mergeWith');5 6/**7 * This method is like `_.defaults` except that it recursively assigns8 * default properties.9 *10 * **Note:** This method mutates `object`.11 *12 * @static13 * @memberOf _14 * @since 3.10.015 * @category Object16 * @param {Object} object The destination object.17 * @param {...Object} [sources] The source objects.18 * @returns {Object} Returns `object`.19 * @see _.defaults20 * @example21 *22 * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });23 * // => { 'a': { 'b': 2, 'c': 3 } }24 */25var defaultsDeep = baseRest(function(args) {26  args.push(undefined, customDefaultsMerge);27  return apply(mergeWith, undefined, args);28});29 30module.exports = defaultsDeep;31 
basant307/AI_Governance_Project · CoolFace