summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/lodash/internal/baseExtremum.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/lodash/internal/baseExtremum.js')
-rw-r--r--deps/npm/node_modules/lodash/internal/baseExtremum.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/deps/npm/node_modules/lodash/internal/baseExtremum.js b/deps/npm/node_modules/lodash/internal/baseExtremum.js
deleted file mode 100644
index b0efff6f9c..0000000000
--- a/deps/npm/node_modules/lodash/internal/baseExtremum.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var baseEach = require('./baseEach');
-
-/**
- * Gets the extremum value of `collection` invoking `iteratee` for each value
- * in `collection` to generate the criterion by which the value is ranked.
- * The `iteratee` is invoked with three arguments: (value, index|key, collection).
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {*} Returns the extremum value.
- */
-function baseExtremum(collection, iteratee, comparator, exValue) {
- var computed = exValue,
- result = computed;
-
- baseEach(collection, function(value, index, collection) {
- var current = +iteratee(value, index, collection);
- if (comparator(current, computed) || (current === exValue && current === result)) {
- computed = current;
- result = value;
- }
- });
- return result;
-}
-
-module.exports = baseExtremum;