Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _baseSum.js
1 /**
2  * The base implementation of `_.sum` without support for iteratee shorthands.
3  *
4  * @private
5  * @param {Array} array The array to iterate over.
6  * @param {Function} iteratee The function invoked per iteration.
7  * @returns {number} Returns the sum.
8  */
9 function baseSum(array, iteratee) {
10   var result,
11       index = -1,
12       length = array.length;
13
14   while (++index < length) {
15     var current = iteratee(array[index]);
16     if (current !== undefined) {
17       result = result === undefined ? current : (result + current);
18     }
19   }
20   return result;
21 }
22
23 module.exports = baseSum;