Buckets:
186 GB
47,027 files
Updated 3 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| .github | 1 items | ||
| test | 1 items | ||
| .editorconfig | 145 Bytes xet | bd3328cb | |
| .eslintrc | 185 Bytes xet | 0b65c934 | |
| .nycrc | 216 Bytes xet | 4448e85a | |
| CHANGELOG.md | 1.63 kB xet | 6505802d | |
| LICENSE | 1.07 kB xet | c0d5f000 | |
| README.md | 2.29 kB xet | 655bb88f | |
| index.d.ts | 335 Bytes xet | cb85879c | |
| index.js | 3.29 kB xet | b1a2bef2 | |
| list.d.ts | 721 Bytes xet | 4f9a1e6f | |
| package.json | 2.26 kB xet | 9ba419c5 | |
| tsconfig.json | 116 Bytes xet | 46720049 |
side-channel-list
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
- Total size
- 186 GB
- Files
- 47,027
- Last updated
- May 1
- Pre-warmed CDN
- US EU US EU
