Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / object / defaults.js
1 var assign = require('./assign'),
2     assignDefaults = require('../internal/assignDefaults'),
3     createDefaults = require('../internal/createDefaults');
4
5 /**
6  * Assigns own enumerable properties of source object(s) to the destination
7  * object for all destination properties that resolve to `undefined`. Once a
8  * property is set, additional values of the same property are ignored.
9  *
10  * **Note:** This method mutates `object`.
11  *
12  * @static
13  * @memberOf _
14  * @category Object
15  * @param {Object} object The destination object.
16  * @param {...Object} [sources] The source objects.
17  * @returns {Object} Returns `object`.
18  * @example
19  *
20  * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
21  * // => { 'user': 'barney', 'age': 36 }
22  */
23 var defaults = createDefaults(assign, assignDefaults);
24
25 module.exports = defaults;