Skip to content

isSubsetOf

isSubsetOf<T>(a, b, comparisonStrategy?): boolean

Defined in: set/is-subset-of.ts:14

Checks whether every element of a is also in b.

Time complexity: O(|a| + |b|) under the default "sameValueZero".

T

Iterable<T>

The candidate subset.

Iterable<T>

The candidate superset.

EqualityComparisonStrategy<T, T> = "sameValueZero"

The equality comparison strategy to use.

boolean

true if a is a subset of b (every element of a is in b).