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

14 lines
255 B
Markdown

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