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