source: node_modules/es-toolkit/dist/math/sumBy.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 280 bytes
RevLine 
[a762898]1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5function sumBy(items, getValue) {
6 let result = 0;
7 for (let i = 0; i < items.length; i++) {
8 result += getValue(items[i], i);
9 }
10 return result;
11}
12
13exports.sumBy = sumBy;
Note: See TracBrowser for help on using the repository browser.