</>PackageGraphPackageGraph

side-channel

npmv1.1.1TypeScript

Store information about any JS value in a side channel. Uses WeakMap if available.

Adopt with care

side-channel is usable, with caveats.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 93 days ago. 2 releases in the last 2 years.

  • BWeight: grade B, Good.

    Pulls in 16 transitive packages, about 346 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 to a project.

5
Direct dependencies

Runtime packages this one declares itself.

16
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

346 KB
Install size

Unpacked size of this package plus its entire runtime tree.

3
Tree depth

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

MIT

Every license you inherit by installing side-channel, 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 README.

const assert = require('assert');
const getSideChannel = require('side-channel');

const channel = getSideChannel();

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);
Example truncated — see the full README.

side-channel vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
side-channelthis page03MIT3 months ago
side-channel-weakmap78.5M1MIT1 day ago
@jridgewell/gen-mapping163.4M4MIT1 day ago
internal-slot79.2M1MIT1 day ago
gcp-metadata01Apache-2.01 day ago
is-map01MIT1 day ago

Dependencies

Declared by side-channel v1.1.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (15)

@arethetypeswrong/cli ^0.18.3@ljharb/eslint-config ^22.2.3@ljharb/tsconfig ^0.3.2@types/object-inspect ^1.13.0@types/tape ^5.8.1auto-changelog ^2.6.0eclint ^2.8.1encoding ^0.1.13eslint ^8.57.1in-publish ^2.0.1npmignore ^0.3.5nyc ^10.3.2safe-publish-latest ^2.0.0tape ^5.9.0typescript next

Used by

Popular packages that depend on side-channel.

Relationship graph

Dependencies (left) and dependents (right) of side-channel.

Frequently installed together

Release history

2 releases in the last two years, typically about 247 days apart.

Recent versions of side-channel
VersionPublishedSizeLicense
1.1.1latest3 months ago22 KBMIT
1.1.01 year ago21 KBMIT
1.0.62 years ago23 KBMIT
1.0.52 years ago17 KBMIT
1.0.45 years ago14 KBMIT
1.0.36 years ago12 KBMIT
1.0.26 years ago10 KBMIT
1.0.16 years ago9.7 KBMIT

Overview

side-channel is an npm package that store information about any JS value in a side channel. Uses WeakMap if available. It has 3 known dependents in the graph. The latest version is 1.1.1, 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 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 (20 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 side-channel?

side-channel is usable, with caveats.

How do I install side-channel?

Run `npm install side-channel` to add side-channel to your npm project.

How many dependencies does side-channel have?

side-channel declares 20 direct dependencies and pulls in 16 packages in total once its runtime tree is resolved totalling about 346 KB on disk.

What license is side-channel released under?

side-channel is distributed under the MIT license.

How popular is side-channel?

npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on side-channel.

Is side-channel still maintained?

The most recent release of side-channel (v1.1.1) was published 3 months ago.

Does side-channel run install scripts?

No. side-channel does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.