Skip to content

isWeakSet

Checks if the given value is a WeakSet. Instances from [other realms][1] are also supported. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms

Usage

isWeakSet(new WeakSet()); // => true
isWeakSet(new Set()); // => false

Installation

Terminal window
npx atmx add helper is-weak-set