The set to check if it is a superset.
The set to check if it is a subset.
A boolean indicating whether the set is a superset of the subset.
This function will return true if all elements of the subset are found in the set, otherwise it will return false.
T - The type of elements in the set.
const set1 = new Set([1, 2, 3, 4]);
const set2 = new Set([2, 4]);
setIsSuperset(set1, set2);
//=> true
Generated using TypeDoc
Checks if a given set is a superset of another set. This function iterates over each element in the
subsetset and checks if it exists in thesetset. If any element in thesubsetset does not exist in thesetset, the function returnsfalse. Otherwise, it returnstrue.