is-map
npmv2.0.3TypeScriptIs this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Adopt with care
is-map is usable, with caveats. Last published 915 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- DMaintenance: grade D, Poor — a real concern.
Last published 915 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 20 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding is-map to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >= 0.4
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the is-map README.
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()));
is-map vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| is-mapthis page | 0 | 1 | MIT | 2 years ago |
| is-set | 0 | 1 | MIT | 1 day ago |
| jsesc | 0 | 1 | MIT | 1 day ago |
| p-map | 0 | 1 | MIT | 1 day ago |
| p-locate | 216.9M | 1 | MIT | 1 day ago |
| @jridgewell/gen-mapping | 163.4M | 4 | MIT | 1 day ago |
Dependencies
Declared by is-map v2.0.3. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (19)
Used by
Popular packages that depend on is-map.
Relationship graph
Dependencies (left) and dependents (right) of is-map.
Frequently installed together
Array#isArray for older browsers
An AST-based pattern checker for JavaScript.
Robustly `.call.bind()` a function
Firefox 17-26 iterators throw a StopIteration object to indicate "done". This normalizes it.
Is this an arguments object? It's a harder question than you think.
Get and robustly cache all JS language-level intrinsics at first require time
string representations of objects in node and the browser
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Release history
No releases in the last two years, typically about 362 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.0.3latest | 2 years ago | 20 KB | MIT |
| 2.0.2 | 5 years ago | 12 KB | MIT |
| 2.0.1 | 6 years ago | 9.6 KB | MIT |
| 2.0.0 | 6 years ago | 8.6 KB | MIT |
| 1.0.1 | 11 years ago | — | MIT |
| 1.0.0 | 11 years ago | — | MIT |
Overview
is-map is an npm package that is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag. It has 1 known dependents in the graph. The latest version is 2.0.3, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag and value a focused solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (19 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Keywords
Funding
Frequently asked questions
Should I use is-map?
is-map is usable, with caveats. Last published 915 days ago.
How do I install is-map?
Run `npm install is-map` to add is-map to your npm project.
What license is is-map released under?
is-map is distributed under the MIT license.
How popular is is-map?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on is-map.
Is is-map still maintained?
The most recent release of is-map (v2.0.3) was published 2 years ago.
Does is-map run install scripts?
No. is-map does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.