mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Bump to v3.10.0.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
var arrayExtremum = require('./arrayExtremum'),
|
||||
baseCallback = require('./baseCallback'),
|
||||
baseExtremum = require('./baseExtremum'),
|
||||
isArray = require('../lang/isArray'),
|
||||
isIterateeCall = require('./isIterateeCall'),
|
||||
toIterable = require('./toIterable');
|
||||
|
||||
@@ -15,11 +16,11 @@ var arrayExtremum = require('./arrayExtremum'),
|
||||
function createExtremum(comparator, exValue) {
|
||||
return function(collection, iteratee, thisArg) {
|
||||
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
||||
iteratee = null;
|
||||
iteratee = undefined;
|
||||
}
|
||||
iteratee = baseCallback(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