Skip to main content
types.isMap - node__util.d.ts - Node documentation
function types.isMap

Usage in Deno

```typescript import { types } from "node:node__util.d.ts"; ```
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`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. ```js 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>