isWeakMap
Checks if a value is a WeakMap instance.
Available since v3.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is WeakMap<object, unknown> — True if value is a WeakMap
Examples
Section titled “Examples”Check whether a value is a WeakMap
Section titled “Check whether a value is a WeakMap”Distinguishes WeakMap from the regular (iterable) Map.
Plain objects are not WeakMaps
Section titled “Plain objects are not WeakMaps”Only real WeakMap instances pass, not objects that merely look like one.
