side-channel-map
Store information about any JS value in a side channel, using a Map.
by ljharbJavaScript
Meet the team
See all 1 on GitHub →Commit activity
Last 12 weeks · 0 commits
Community health
4 of 6 standards met
Recent fixes
Add the explicit entry for users that need storage but not assertions. This exposes a storage-only subpath while keeping the existing root API, assertion behavior, native-intrinsic captures, and collection fallbacks. Consumers that do not call assert can avoid loading its formatter without changing their storage algorithm. The get/has/set/delete implementation is shared by the new subpath and the existing root entry. The root still supplies assert, including its existing error messages and dynamic lookup of channel.has. Validation with the coordinated source branches: Existing and new test suites pass on Node 16.20.2 and 24.19.0. ESLint passes (existing warnings remain); declarations and checked JS pass TypeScript 5.9.3 with dependency paths pointing to the coordinated source branches. An additional local before/after differential passes with WeakMap+Map, Map-only, WeakMap-only, and neither, including primitive/NaN keys, aliases/cycles, filter-created objects, Proxy access order, and late collection-prototype mutation. A cold-load regression test rejects any attempt by the storage entry to load object-inspect. Package dry runs include storage.js and storage.d.ts. The root now wraps a storage object to preserve its existing own-property order and closed-over assertion semantics. That adds one wrapper object for root-entry users; no runtime-performance improvement is claimed. The Node <16 CI matrix remains to be run upstream. This is the first step of a coordinated storage-only path for side-channel and qs. No release number or published dependency range is assumed by this PR. Related discussion: https://github.com/ljharb/qs/issues/404 and https://github.com/ljharb/side-channel/pull/12. Unlike the dependency-removal proposal, this retains the existing storage algorithms, call-bound/get-intrinsic behavior where applicable, and the public assertion formatter. Coordinated integration: https://github.com/ljharb/side-channel/pull/17; consumer: https://github.com/ljharb/qs/pull/632.
Repository: ljharb/side-channel-map. Description: Store information about any JS value in a side channel, using a Map. Stars: 2, Forks: 3. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Open PRs: 0, open issues: 1. Last activity: 9mo ago. Community health: 85%. Top contributors: ljharb.