From 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 18 Oct 2022 08:59:09 +0200 Subject: Update --- alarm/node_modules/lodash/sum.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 alarm/node_modules/lodash/sum.js (limited to 'alarm/node_modules/lodash/sum.js') diff --git a/alarm/node_modules/lodash/sum.js b/alarm/node_modules/lodash/sum.js new file mode 100644 index 0000000..3b07ee4 --- /dev/null +++ b/alarm/node_modules/lodash/sum.js @@ -0,0 +1,24 @@ +var baseSum = require('./_baseSum'), + identity = require('./identity'); + +/** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ +function sum(array) { + return (array && array.length) + ? baseSum(array, identity) + : 0; +} + +module.exports = sum; -- cgit