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

Usage in Deno

```typescript import { isMap } from "node:node__util--types.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>