isSet
Returns true for Set instances
122 bytes
Usage
Returns true for Set instances, even if they are subclass instances or from
other realms.
import * as import _
_ from 'radashi'
import _
_.isSet<Set<unknown>>(value: Set<unknown>): value is Set<unknown>export isSet
Checks if the given value is a Set.
Instances from other realms are also supported.
isSet(new var Set: SetConstructornew <unknown>(iterable?: Iterable<unknown> | null | undefined) => Set<unknown> (+1 overload)
Set()) // trueimport _
_.isSet<(Anonymous class)>(value: (Anonymous class)): value is (Anonymous class)export isSet
Checks if the given value is a Set.
Instances from other realms are also supported.
isSet(new (class extends var Set: SetConstructor
Set {})()) // true