AeThex-Engine-Core/services/auth-service/node_modules/side-channel-map
mrpiglr 190b6b2eab
Some checks are pending
Build AeThex Engine / build-windows (push) Waiting to run
Build AeThex Engine / build-linux (push) Waiting to run
Build AeThex Engine / build-macos (push) Waiting to run
Build AeThex Engine / create-release (push) Blocked by required conditions
Deploy Docsify Documentation / build (push) Waiting to run
Deploy Docsify Documentation / deploy (push) Blocked by required conditions
chore: sync local changes to Forgejo
2026-03-13 00:37:06 -07:00
..
.github chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
test chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
.editorconfig chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
.eslintrc chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
.nycrc chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
CHANGELOG.md chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
index.d.ts chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
index.js chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
LICENSE chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
package.json chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
README.md chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00
tsconfig.json chore: sync local changes to Forgejo 2026-03-13 00:37:06 -07:00

side-channel-map Version Badge

github actions coverage License Downloads

npm badge

Store information about any JS value in a side channel, using a Map.

Warning: if the key is an object, this implementation will leak memory until you delete it. Use side-channel for the best available strategy.

Getting started

npm install --save side-channel-map

Usage/Examples

const assert = require('assert');
const getSideChannelMap = require('side-channel-map');

const channel = getSideChannelMap();

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);

channel.delete(key);
assert.equal(channel.has(key), false);
assert.throws(() => channel.assert(key), TypeError);

Tests

Clone the repo, npm install, and run npm test