• This method is like _.xor except that it accepts comparator which is invoked to compare elements of arrays. The comparator is invoked with two arguments: (arrVal, othVal).

    Type Parameters

    • T

    Parameters

    • Optional arrays: null | List<T>

      The arrays to inspect.

    • Optional comparator: Comparator<T>

      The comparator invoked per element.

    Returns T[]

    Returns the new array of values.

    Example

    var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
    var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];

    _.xorWith(objects, others, _.isEqual);
    // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  • Type Parameters

    • T

    Parameters

    • arrays: undefined | null | List<T>
    • arrays2: undefined | null | List<T>
    • Optional comparator: Comparator<T>

    Returns T[]

    See

    _.xorWith

  • Type Parameters

    • T

    Parameters

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

    Returns T[]

    See

    _.xorWith

Generated using TypeDoc