Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / internal / createDefaults.js
1 var restParam = require('../function/restParam');
2
3 /**
4  * Creates a `_.defaults` or `_.defaultsDeep` function.
5  *
6  * @private
7  * @param {Function} assigner The function to assign values.
8  * @param {Function} customizer The function to customize assigned values.
9  * @returns {Function} Returns the new defaults function.
10  */
11 function createDefaults(assigner, customizer) {
12   return restParam(function(args) {
13     var object = args[0];
14     if (object == null) {
15       return object;
16     }
17     args.push(customizer);
18     return assigner.apply(undefined, args);
19   });
20 }
21
22 module.exports = createDefaults;