isMap - Node documentation
function isMap

Usage in Deno

import { isMap } from "node:util/types";
isMap<T>(object: T | { }): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>

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

util.types.isMap(new Map());  // Returns true

Type Parameters

T

Parameters

object: T | { }

Return Type

object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>