is-map ![Version Badge](https://camo.githubusercontent.com/3d4212efc1502f7e7ef9f1d6fe6c4647b9faf425db2117bd26f78d93aa2f4efd/68747470733a2f2f76657273696f6e626164672e65732f696e73706563742d6a732f69732d6d61702e737667)
Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Example
var isMap = require('is-map');
assert(!isMap(function () {}));
assert(!isMap(null));
assert(!isMap(function* () { yield 42; return Infinity; });
assert(!isMap(Symbol('foo')));
assert(!isMap(1n));
assert(!isMap(Object(1n)));
assert(!isMap(new Set()));
assert(!isMap(new WeakSet()));
assert(!isMap(new WeakMap()));
assert(isMap(new Map()));
class MyMap extends Map {}
assert(isMap(new MyMap()));
Tests
Simply clone the repo, npm install
, and run npm test