Test containment with setIsSubset
setIsSubset(A, B) tests whether every member of A is also a member of B. It returns a Boolean and is useful for validation and permission checks.
Example
{1,2} is a subset of {1,2,3}; the reverse is false. Use setDifference to see which members prevent containment and setIntersect to inspect overlap.
Caveats
The empty set is a subset of every set. Duplicates should not affect membership, but normalize uncertain inputs with setDistinct. For equal sets, both subset directions are true; use deepEqual if representation equality matters too.