source: node_modules/es-toolkit/dist/compat/array/xorBy.d.mts@ a762898

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

Added visualizations

  • Property mode set to 100644
File size: 2.5 KB
Line 
1import { ValueIteratee } from '../_internal/ValueIteratee.mjs';
2
3/**
4 * This method is like `xor` except that it accepts `iteratee` which is
5 * invoked for each element of each `arrays` to generate the criterion by which
6 * uniqueness is computed. The iteratee is invoked with one argument: (value).
7 *
8 * @template T
9 * @param {ArrayLike<T> | null | undefined} arrays - The arrays to inspect.
10 * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.
11 * @returns {T[]} Returns the new array of values.
12 *
13 * @example
14 * xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
15 * // => [1.2, 4.3]
16 *
17 * @example
18 * xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
19 * // => [{ 'x': 2 }]
20 */
21declare function xorBy<T>(arrays: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
22/**
23 * This method is like `xor` except that it accepts `iteratee` which is
24 * invoked for each element of each `arrays` to generate the criterion by which
25 * uniqueness is computed. The iteratee is invoked with one argument: (value).
26 *
27 * @template T
28 * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.
29 * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.
30 * @param {ValueIteratee<T>} [iteratee] - The iteratee invoked per element.
31 * @returns {T[]} Returns the new array of values.
32 *
33 * @example
34 * xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
35 * // => [1.2, 4.3]
36 */
37declare function xorBy<T>(arrays: ArrayLike<T> | null | undefined, arrays2: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
38/**
39 * This method is like `xor` except that it accepts `iteratee` which is
40 * invoked for each element of each `arrays` to generate the criterion by which
41 * uniqueness is computed. The iteratee is invoked with one argument: (value).
42 *
43 * @template T
44 * @param {ArrayLike<T> | null | undefined} arrays - The first array to inspect.
45 * @param {ArrayLike<T> | null | undefined} arrays2 - The second array to inspect.
46 * @param {ArrayLike<T> | null | undefined} arrays3 - The third array to inspect.
47 * @param {...Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>} iteratee - The iteratee invoked per element.
48 * @returns {T[]} Returns the new array of values.
49 *
50 * @example
51 * xorBy([1.2, 2.3], [3.4, 4.5], [5.6, 6.7], Math.floor);
52 * // => [1.2, 3.4, 5.6]
53 */
54declare function xorBy<T>(arrays: ArrayLike<T> | null | undefined, arrays2: ArrayLike<T> | null | undefined, arrays3: ArrayLike<T> | null | undefined, ...iteratee: Array<ValueIteratee<T> | ArrayLike<T> | null | undefined>): T[];
55
56export { xorBy };
Note: See TracBrowser for help on using the repository browser.