1 var bindCallback = require('./bindCallback'),
2 keysIn = require('../object/keysIn');
5 * Creates a function for `_.forIn` or `_.forInRight`.
8 * @param {Function} objectFunc The function to iterate over an object.
9 * @returns {Function} Returns the new each function.
11 function createForIn(objectFunc) {
12 return function(object, iteratee, thisArg) {
13 if (typeof iteratee != 'function' || thisArg !== undefined) {
14 iteratee = bindCallback(iteratee, thisArg, 3);
16 return objectFunc(object, iteratee, keysIn);
20 module.exports = createForIn;