predictype / predicates/sets / setIntersection
setIntersection<
T
>(source
,oper
,target
):boolean
Defined in: predicates/sets/setIntersection.ts:26
Checks intersection properties between two sets using the specified operation.
T
Set
<T
>
The first set.
The intersection operation to perform (e.g. ‘disjoint’, ‘intersects’).
Set
<T
>
The second set.
boolean
True if the intersection check is valid according to the operator, otherwise false.
If the operation is not recognized.
const a = new Set([1, 2]);
const b = new Set([2, 3]);
const c = new Set([4, 5]);
setIntersection(a, 'intersects', b); // true
setIntersection(a, 'disjoint', c); // true
Supported Operators: