// package
lodash.isweakset
type: "module"
// preferences
// replacements (1)
snippet::is-weakset
Simple or drop-in replacementThis package is no longer necessary. You can use `instanceof WeakSet` to check if a value is a `WeakSet`, or if cross-realm, use `Object.prototype.toString.call(v) === "[object WeakSet]"`
// example
const isWeakSet = v instanceof WeakSet;
// for cross-realm
const isWeakSetCrossRealm =
Object.prototype.toString.call(v) ===
'[object WeakSet]';