side-channel-weakmap
npmv1.0.2TypeScriptStore information about any JS value in a side channel. Uses WeakMap if available.
Adopt with care
side-channel-weakmap is usable, with caveats. Last published 638 days ago. 3 releases in the last 2 years.
- AAdoption: grade A, Excellent.
78.5M downloads per week and 1 known dependents.
- CMaintenance: grade C, Fair — worth a look.
Last published 638 days ago. 3 releases in the last 2 years.
- BWeight: grade B, Good.
Pulls in 14 transitive packages, about 307 KB installed (at least — some of the tree is still being crawled).
- 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 side-channel-weakmap 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.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing side-channel-weakmap, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >= 0.4
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the side-channel-weakmap README.
const assert = require('assert');
const getSideChannelList = require('side-channel-weakmap');
const channel = getSideChannelList();
const key = {};
assert.equal(channel.has(key), false);
assert.throws(() => channel.assert(key), TypeError);
channel.set(key, 42);
channel.assert(key); // does not throw
assert.equal(channel.has(key), true);
assert.equal(channel.get(key), 42);side-channel-weakmap 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 |
|---|---|---|---|---|
| side-channel-weakmapthis page | 78.5M | 1 | MIT | 1 year ago |
| side-channel | 0 | 3 | MIT | 1 day ago |
| @jridgewell/gen-mapping | 163.4M | 4 | MIT | 1 day ago |
| internal-slot | 79.2M | 1 | MIT | 1 day ago |
| convert-source-map | 0 | 7 | MIT | 1 day ago |
| gcp-metadata | 0 | 1 | Apache-2.0 | 1 day ago |
Dependencies
Declared by side-channel-weakmap v1.0.2. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (5)
Dev (17)
Used by
Popular packages that depend on side-channel-weakmap.
Relationship graph
Dependencies (left) and dependents (right) of side-channel-weakmap.
Frequently installed together
An AST-based pattern checker for JavaScript.
A simple cache for a few of the JS Error constructors.
string representations of objects in node and the browser
Store information about any JS value in a side channel, using a linked list
Store information about any JS value in a side channel, using a Map
Release history
3 releases in the last two years, typically about 0 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.0.2latest | 1 year ago | 14 KB | MIT |
| 1.0.1 | 1 year ago | 14 KB | MIT |
| 1.0.0 | 1 year ago | 14 KB | MIT |
Overview
side-channel-weakmap is an npm package that store information about any JS value in a side channel. Uses WeakMap if available. It is extremely widely used, with about 78.5M downloads per week and 1 known dependents in the graph. The latest version is 1.0.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need store information about any JS value in a side channel. Uses WeakMap if available and value a battle-tested, widely-adopted 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
- Large, well-established user base (78.5M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (22 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use side-channel-weakmap?
side-channel-weakmap is usable, with caveats. Last published 638 days ago. 3 releases in the last 2 years.
How do I install side-channel-weakmap?
Run `npm install side-channel-weakmap` to add side-channel-weakmap to your npm project.
How many dependencies does side-channel-weakmap have?
side-channel-weakmap declares 22 direct dependencies and pulls in 14 packages in total once its runtime tree is resolved totalling about 307 KB on disk.
What license is side-channel-weakmap released under?
side-channel-weakmap is distributed under the MIT license.
How popular is side-channel-weakmap?
side-channel-weakmap has approximately 78,481,192 downloads per week and 1 known dependent packages.
Is side-channel-weakmap still maintained?
The most recent release of side-channel-weakmap (v1.0.2) was published 1 year ago.
Does side-channel-weakmap run install scripts?
No. side-channel-weakmap does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.