Skip to content

Function: isSet()

ts
function isSet(value): value is Set<unknown>;

Checks whether a value is a Set. 检查值是否为 Set

Parameters

ParameterTypeDescription
valueunknownThe value to check / 要检查的值

Returns

value is Set<unknown>

true when the value is a Set / 值是 Set 时返回 true

Example

ts
isSet(new Set())
// => true

Since

1.2.0

Released under the MIT License.