Detect whether or not an object is an ES6 Map.
Determine if an object
is a Map
.
Kind: Exported function
Returns: boolean
- true
if the object
is a Map
,
else false
.
Param | Type | Description |
---|---|---|
object | * |
The object to test. |
Example
import isMap from 'is-map-x';
const m = new Map();
console.log(isMap([])); // false
console.log(isMap(true)); // false
console.log(isMap(m)); // true