hasAll
ts
function Set.hasAll<T>(
target: ReadonlySet<T>,
values: Iterable<NoInfer<T>>,
): booleanReturns true if the set contains all values from the iterable, false otherwise.
Example
ts
import { Set } from "@monstermann/set";
Set.hasAll(Set.create([1, 2, 3]), [1, 2]); // true
Set.hasAll(Set.create([1, 2, 3]), [1, 4]); // falsets
import { Set } from "@monstermann/set";
pipe(Set.create([1, 2, 3]), Set.hasAll([1, 2])); // true
pipe(Set.create([1, 2, 3]), Set.hasAll([1, 4])); // false