frontend/.pnpm-store/v3/files/7b/74ae929bc33ef5d8b5703da5e19b3381907ecfc863dde767a3d25d007b59e5beeb2161f3320fb5de16a895bffb5ab0d46b5ecb27bdce0c6869d5d272a353f1

28 lines
490 B
Plaintext

# Map
_Map_ instance
## `map/is`
Confirms if given object is a native _map_
```javascript
const isMap = require("type/map/is");
isMap(new Map()); // true
isMap(new Set()); // false
isMap({}); // false
```
## `map/ensure`
If given argument is a _map_, it is returned back. Otherwise `TypeError` is thrown.
```javascript
const ensureMap = require("type/map/ensure");
const map = new Map();
ensureMap(map); // map
eensureMap({}); // Thrown TypeError: [object Object] is not a map
```