curaflow/node_modules/side-channel-map
Deep Koluguri 6058f9a862
Build Curio HMS / build-and-deploy (push) Successful in 48s Details
feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys
2026-05-23 11:27:26 -04:00
..
.github feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
test feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
.editorconfig feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
.eslintrc feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
.nycrc feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
CHANGELOG.md feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
LICENSE feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
README.md feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
index.d.ts feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
index.js feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
package.json feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00
tsconfig.json feat: implement Zen 4.0 Focus-First layout with SOAP notes and hotkeys 2026-05-23 11:27:26 -04:00

README.md

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