summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/lodash/_baseMean.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/lodash/_baseMean.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/lodash/_baseMean.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/lodash/_baseMean.js b/bin/wiki/ImportarDesdeURL/node_modules/lodash/_baseMean.js
new file mode 100644
index 00000000..fa9e00a0
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/lodash/_baseMean.js
@@ -0,0 +1,20 @@
+var baseSum = require('./_baseSum');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+}
+
+module.exports = baseMean;