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

28
node_modules/es-toolkit/dist/set/forEach.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
//#region src/set/forEach.ts
/**
* Executes a provided function once for each element in a Set.
*
* This function iterates through all elements of the Set and executes the callback function
* for each element. The callback receives the value twice (for consistency with Map.forEach)
* and the Set itself as arguments.
*
* @template T - The type of elements in the Set.
* @param {Set<T>} set - The Set to iterate over.
* @param {(value: T, value2: T, set: Set<T>) => void} callback - A function to execute for each element.
* @returns {void}
*
* @example
* const set = new Set([1, 2, 3]);
* forEach(set, (value) => {
* console.log(value * 2);
* });
* // Output:
* // 2
* // 4
* // 6
*/
function forEach(set, callback) {
for (const value of set) callback(value, value, set);
}
//#endregion
exports.forEach = forEach;