Skip to main content
isWeakMap - util/types - Node documentation
function isWeakMap

Usage in Deno

import { isWeakMap } from "node:util/types";
isWeakMap(object: unknown): object is WeakMap<object, unknown>

Returns true if the value is a built-in WeakMap instance.

util.types.isWeakMap(new WeakMap());  // Returns true

Parameters

object: unknown

Return Type

object is WeakMap<object, unknown>