Use getIteratee in more places.

This commit is contained in:
John-David Dalton
2016-03-30 12:15:35 -07:00
parent 7a3dda6105
commit 55c3299d5c

View File

@@ -8258,7 +8258,7 @@
function forEach(collection, iteratee) { function forEach(collection, iteratee) {
return (typeof iteratee == 'function' && isArray(collection)) return (typeof iteratee == 'function' && isArray(collection))
? arrayEach(collection, iteratee) ? arrayEach(collection, iteratee)
: baseEach(collection, baseCastFunction(iteratee)); : baseEach(collection, getIteratee(iteratee));
} }
/** /**
@@ -8283,7 +8283,7 @@
function forEachRight(collection, iteratee) { function forEachRight(collection, iteratee) {
return (typeof iteratee == 'function' && isArray(collection)) return (typeof iteratee == 'function' && isArray(collection))
? arrayEachRight(collection, iteratee) ? arrayEachRight(collection, iteratee)
: baseEachRight(collection, baseCastFunction(iteratee)); : baseEachRight(collection, getIteratee(iteratee));
} }
/** /**
@@ -11841,7 +11841,7 @@
function forIn(object, iteratee) { function forIn(object, iteratee) {
return object == null return object == null
? object ? object
: baseFor(object, baseCastFunction(iteratee), keysIn); : baseFor(object, getIteratee(iteratee), keysIn);
} }
/** /**
@@ -11872,7 +11872,7 @@
function forInRight(object, iteratee) { function forInRight(object, iteratee) {
return object == null return object == null
? object ? object
: baseForRight(object, baseCastFunction(iteratee), keysIn); : baseForRight(object, getIteratee(iteratee), keysIn);
} }
/** /**
@@ -11903,7 +11903,7 @@
* // => Logs 'a' then 'b' (iteration order is not guaranteed). * // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/ */
function forOwn(object, iteratee) { function forOwn(object, iteratee) {
return object && baseForOwn(object, baseCastFunction(iteratee)); return object && baseForOwn(object, getIteratee(iteratee));
} }
/** /**
@@ -11932,7 +11932,7 @@
* // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
*/ */
function forOwnRight(object, iteratee) { function forOwnRight(object, iteratee) {
return object && baseForOwnRight(object, baseCastFunction(iteratee)); return object && baseForOwnRight(object, getIteratee(iteratee));
} }
/** /**
@@ -14865,7 +14865,7 @@
var index = MAX_ARRAY_LENGTH, var index = MAX_ARRAY_LENGTH,
length = nativeMin(n, MAX_ARRAY_LENGTH); length = nativeMin(n, MAX_ARRAY_LENGTH);
iteratee = baseCastFunction(iteratee); iteratee = getIteratee(iteratee);
n -= MAX_ARRAY_LENGTH; n -= MAX_ARRAY_LENGTH;
var result = baseTimes(length, iteratee); var result = baseTimes(length, iteratee);