mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Improve perf of max and min common case with arrays.
This commit is contained in:
@@ -3316,7 +3316,7 @@
|
||||
}
|
||||
iteratee = getCallback(iteratee, thisArg, 3);
|
||||
if (iteratee.length == 1) {
|
||||
collection = toIterable(collection);
|
||||
collection = isArray(collection) ? collection : toIterable(collection);
|
||||
var result = arrayExtremum(collection, iteratee, comparator, exValue);
|
||||
if (!(collection.length && result === exValue)) {
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user