max_liu b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
test b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
.editorconfig b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
.gitattributes b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
.nycrc b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
README.md b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
index.js b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
package.json b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 il y a 2 semaines

README.md

is-map Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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