From 9a9e4cddd7561131a2a2ec2ed8d5b9c5318070b9 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sun, 5 Jul 2015 11:25:00 -0700 Subject: [PATCH] Rename `baseExtremumBy` and `createExtremumBy` helpers. --- lodash.src.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index da6cd435f..537399ad6 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -1987,7 +1987,7 @@ * @param {*} exValue The initial extremum value. * @returns {*} Returns the extremum value. */ - function baseExtremumBy(collection, iteratee, comparator, exValue) { + function baseExtremum(collection, iteratee, comparator, exValue) { var computed = exValue, result = computed; @@ -3221,7 +3221,7 @@ * @param {*} exValue The initial extremum value. * @returns {Function} Returns the new extremum function. */ - function createExtremumBy(comparator, exValue) { + function createExtremum(comparator, exValue) { return function(collection, iteratee, guard) { if (guard && isIterateeCall(collection, iteratee, guard)) { iteratee = undefined; @@ -3237,7 +3237,7 @@ return result; } } - return baseExtremumBy(collection, iteratee, comparator, exValue); + return baseExtremum(collection, iteratee, comparator, exValue); }; } @@ -11232,7 +11232,7 @@ * _.maxBy(users, 'age'); * // => { 'user': 'fred', 'age': 40 } */ - var maxBy = createExtremumBy(gt, NEGATIVE_INFINITY); + var maxBy = createExtremum(gt, NEGATIVE_INFINITY); /** * Gets the minimum value of `collection`. If `collection` is empty or falsey @@ -11281,7 +11281,7 @@ * _.minBy(users, 'age'); * // => { 'user': 'barney', 'age': 36 } */ - var minBy = createExtremumBy(lt, POSITIVE_INFINITY); + var minBy = createExtremum(lt, POSITIVE_INFINITY); /** * Calculates `n` rounded to `precision`.