isWeakKind
Available since v0.9
Determine if object of a "weak" kind, e.g. WeakRef
, WeakMap
, or WeakSet
.
import { isWeakKind } from '@aedart/support/reflections';
const a = {};
isWeakKind(null); // false
isWeakKind(a); // false
isWeakKind(new Map()); // false
isWeakKind(new Set()); // false
isWeakKind(new WeakRef(a)); // true
isWeakKind(new WeakMap()); // true
isWeakKind(new WeakSet()); // true