Function xorBy

  • This method is like _.xor except that it accepts iteratee which is invoked for each element of each arrays to generate the criterion by which uniqueness is computed. The iteratee is invoked with one argument: (value).

    Example

    _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
    // => [1.2, 4.3]

    // using the `_.property` iteratee shorthand
    _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
    // => [{ 'x': 2 }]

    Type Parameters

    • T

    Parameters

    • Optional arrays: null | List<T>

      The arrays to inspect.

    • Optional iteratee: ValueIteratee<T>

      The iteratee invoked per element.

    Returns T[]

    Returns the new array of values.

  • See

    _.xorBy

    Type Parameters

    • T

    Parameters

    • arrays: undefined | null | List<T>
    • arrays2: undefined | null | List<T>
    • Optional iteratee: ValueIteratee<T>

    Returns T[]

  • See

    _.xorBy

    Type Parameters

    • T

    Parameters

    • arrays: undefined | null | List<T>
    • arrays2: undefined | null | List<T>
    • arrays3: undefined | null | List<T>
    • Rest ...iteratee: (undefined | null | List<T> | ValueIteratee<T>)[]

    Returns T[]

Generated using TypeDoc