Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

21
node_modules/es-toolkit/dist/math/sum.mjs generated vendored Normal file
View File

@@ -0,0 +1,21 @@
//#region src/math/sum.ts
/**
* Calculates the sum of an array of numbers.
*
* This function takes an array of numbers and returns the sum of all the elements in the array.
*
* @param {number[]} nums - An array of numbers to be summed.
* @returns {number} The sum of all the numbers in the array.
*
* @example
* const numbers = [1, 2, 3, 4, 5];
* const result = sum(numbers);
* // result will be 15
*/
function sum(nums) {
let result = 0;
for (let i = 0; i < nums.length; i++) result += nums[i];
return result;
}
//#endregion
export { sum };