CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
sum.js25 linesDownload Raw Back to lodash-es
1import baseSum from './_baseSum.js';2import identity from './identity.js';3 4/**5 * Computes the sum of the values in `array`.6 *7 * @static8 * @memberOf _9 * @since 3.4.010 * @category Math11 * @param {Array} array The array to iterate over.12 * @returns {number} Returns the sum.13 * @example14 *15 * _.sum([4, 2, 8, 6]);16 * // => 2017 */18function sum(array) {19  return (array && array.length)20    ? baseSum(array, identity)21    : 0;22}23 24export default sum;25 
basant307/AI_Governance_Project · CoolFace