1 var bindCallback = require('./bindCallback');
4 * Creates a function for `_.forOwn` or `_.forOwnRight`.
7 * @param {Function} objectFunc The function to iterate over an object.
8 * @returns {Function} Returns the new each function.
10 function createForOwn(objectFunc) {
11 return function(object, iteratee, thisArg) {
12 if (typeof iteratee != 'function' || thisArg !== undefined) {
13 iteratee = bindCallback(iteratee, thisArg, 3);
15 return objectFunc(object, iteratee);
19 module.exports = createForOwn;