Files
30-seconds-of-code/snippets/isSet.md
2018-01-16 16:42:17 +02:00

227 B

isSet

Checks if value is classified as a Set object.

Use the instanceofoperator to check if the provided value is a Set object.

const isSet = val => val instanceof Set;
isSet(new Set()); // true