Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / internal / createForOwn.js
1 var bindCallback = require('./bindCallback');
2
3 /**
4  * Creates a function for `_.forOwn` or `_.forOwnRight`.
5  *
6  * @private
7  * @param {Function} objectFunc The function to iterate over an object.
8  * @returns {Function} Returns the new each function.
9  */
10 function createForOwn(objectFunc) {
11   return function(object, iteratee, thisArg) {
12     if (typeof iteratee != 'function' || thisArg !== undefined) {
13       iteratee = bindCallback(iteratee, thisArg, 3);
14     }
15     return objectFunc(object, iteratee);
16   };
17 }
18
19 module.exports = createForOwn;