• Creates an array of unique array values not included in the other provided arrays using SameValueZero for equality comparisons.

    Type Parameters

    • T1
    • T2

    Parameters

    • array: undefined | null | List<T1>
    • Optionalvalues: List<T2>

      The arrays to inspect.

    • Optionalcomparator: Comparator2<T1, T2>

      The comparator invoked per element.

    Returns T1[]

    Returns the new array of filtered values.

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

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

    • T1
    • T2
    • T3

    Parameters

    • array: undefined | null | List<T1>
    • values1: List<T2>
    • values2: List<T3>
    • comparator: Comparator2<T1, T2 | T3>

    Returns T1[]

    _.intersectionWith

  • Type Parameters

    • T1
    • T2
    • T3
    • T4

    Parameters

    • array: undefined | null | List<T1>
    • values1: List<T2>
    • values2: List<T3>
    • Rest...values: (List<T4> | Comparator2<T1, T2 | T3 | T4>)[]

    Returns T1[]

    _.intersectionWith

  • Type Parameters

    • T

    Parameters

    • Optionalarray: null | List<T>
    • Rest...values: (List<T> | Comparator2<T, never>)[]

    Returns T[]

    _.intersectionWith