Options
All
  • Public
  • Public/Protected
  • All
Menu

Module array/intersection

Index

References

Functions

References

Renames and re-exports intersection

Functions

  • intersection<T>(list1: ArrayLike<T>, list2: ArrayLike<T>): T[]
  • intersection<T>(list1: ArrayLike<T>): (list2: ArrayLike<T>) => T[]
  • Combines two array into a set (i.e. no duplicates) composed of those elements common to both arrays.

    example
     intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3]
    

    Type parameters

    • T

    Parameters

    • list1: ArrayLike<T>
    • list2: ArrayLike<T>

    Returns T[]

    The array of elements found in both a and b.

  • Combines two array into a set (i.e. no duplicates) composed of those elements common to both arrays.

    example
     intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3]
    

    Type parameters

    • T

    Parameters

    • list1: ArrayLike<T>

    Returns (list2: ArrayLike<T>) => T[]

    The array of elements found in both a and b.

      • (list2: ArrayLike<T>): T[]
      • Parameters

        • list2: ArrayLike<T>

        Returns T[]

Generated using TypeDoc