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

14 lines
227 B
Markdown

### isSet
Checks if value is classified as a Set object.
Use the `instanceof`operator to check if the provided value is a `Set` object.
```js
const isSet = val => val instanceof Set;
```
```js
isSet(new Set()); // true
```