Skip to content

Documentation / @ripl/utilities / arrayIntersection

Function: arrayIntersection()

arrayIntersection<TLeft, TRight>(leftInput, rightInput, predicate?): TLeft[]

Defined in: packages/utilities/src/collection.ts:158

Returns items from the left array that have a matching counterpart in the right array.

Type Parameters

Type ParameterDefault type
TLeft-
TRightTLeft

Parameters

ParameterType
leftInputTLeft[]
rightInputTRight[]
predicate?ArrayJoinPredicate<TLeft, TRight>

Returns

TLeft[]