the-tip-top-backend/backend/node_modules/side-channel-list
2025-10-16 00:58:52 +00:00
..
.github Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
test Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
.editorconfig Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
.eslintrc Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
.nycrc Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
CHANGELOG.md Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
index.d.ts Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
index.js Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
LICENSE Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
list.d.ts Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
package.json Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
README.md Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00
tsconfig.json Initialisation du projet The Tip Top 2025-10-16 00:58:52 +00:00

side-channel-list Version Badge

github actions coverage License Downloads

npm badge

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

Warning: this implementation will leak memory until you delete the key. Use side-channel for the best available strategy.

Getting started

npm install --save side-channel-list

Usage/Examples

const assert = require('assert');
const getSideChannelList = require('side-channel-list');

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

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