mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Bump to v4.11.2.
This commit is contained in:
6
maxBy.js
6
maxBy.js
@@ -1,6 +1,6 @@
|
||||
var baseExtremum = require('./_baseExtremum'),
|
||||
baseIteratee = require('./_baseIteratee'),
|
||||
gt = require('./gt');
|
||||
baseGt = require('./_baseGt'),
|
||||
baseIteratee = require('./_baseIteratee');
|
||||
|
||||
/**
|
||||
* This method is like `_.max` except that it accepts `iteratee` which is
|
||||
@@ -28,7 +28,7 @@ var baseExtremum = require('./_baseExtremum'),
|
||||
*/
|
||||
function maxBy(array, iteratee) {
|
||||
return (array && array.length)
|
||||
? baseExtremum(array, baseIteratee(iteratee), gt)
|
||||
? baseExtremum(array, baseIteratee(iteratee), baseGt)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user