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

22
node_modules/es-toolkit/dist/array/xorWith.d.mts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
//#region src/array/xorWith.d.ts
/**
* Computes the symmetric difference between two arrays using a custom equality function.
* The symmetric difference is the set of elements which are in either of the arrays,
* but not in their intersection.
*
* @template T - Type of elements in the input arrays.
*
* @param {T[]} arr1 - The first array.
* @param {T[]} arr2 - The second array.
* @param {(item1: T, item2: T) => boolean} areElementsEqual - The custom equality function to compare elements.
* @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function.
*
* @example
* // Custom equality function for objects with an 'id' property
* const areObjectsEqual = (a, b) => a.id === b.id;
* xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual);
* // Returns [{ id: 1 }, { id: 3 }]
*/
declare function xorWith<T>(arr1: readonly T[], arr2: readonly T[], areElementsEqual: (item1: T, item2: T) => boolean): T[];
//#endregion
export { xorWith };