diff options
Diffstat (limited to 'tools/eslint/node_modules/lodash/defaultsDeep.js')
-rw-r--r-- | tools/eslint/node_modules/lodash/defaultsDeep.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/lodash/defaultsDeep.js b/tools/eslint/node_modules/lodash/defaultsDeep.js new file mode 100644 index 0000000000..c495aee4d9 --- /dev/null +++ b/tools/eslint/node_modules/lodash/defaultsDeep.js @@ -0,0 +1,29 @@ +var apply = require('./_apply'), + mergeDefaults = require('./_mergeDefaults'), + mergeWith = require('./mergeWith'), + rest = require('./rest'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); + * // => { 'user': { 'name': 'barney', 'age': 36 } } + * + */ +var defaultsDeep = rest(function(args) { + args.push(undefined, mergeDefaults); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; |