Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

is-map

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

is-map

Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

    2.0.2latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
14,189,839
decreased by-0.26%

Weekly downloads

Changelog

Source

v2.0.2 - 2020-12-13

Commits

Readme

Source

is-map Version Badge

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

Keywords

FAQs

Last updated on 14 Dec 2020

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc