InternMap is a JavaScript utility that extends Map to “intern” keys, so distinct Date instances (or other keys with matching valueOf results) are treated as equal and only one key instance is kept. It is useful when you want Map behavior that matches by value for non-primitive keys instead of requiring the same object identity, and it can also accept a custom key function to define how keys are compared.
Project status
- Maintenance status: Quiet, dormant since the last recorded upstream push was 2021-12-08 and the most recent published updates were in 2021-09 (over 4 years ago relative to 2026-10-02).
- Apparent update cadence: Active period in mid to late 2021 (v2.0.1 in June, v2.0.2 in September, v2.0.3 shortly after), followed by no further updates afterward.
AI summary generated
Recent updates
v2.0.3
v2.0.3 updates the build pipeline to prevent Terser from mangling the identifiers InternMap and InternSet in the minified UMD output. The release notes describe this change directly, and the code diff shows it implemented via Terser mangle reservations.
v2.0.2
v2.0.2 fixes a broken implementation of delete for the interned Map and Set wrappers, and adds regression tests to cover those cases. The core change is in the internal delete logic used by both Map.delete and Set.delete.
v2.0.1
v2.0.1 primarily updates build and development tooling dependencies and adjusts the build output to be more reproducible. The code diff also includes a change to the test command and the Rollup banner generation logic.
v2.0.0
v2.0.0 switches the package to ESM by setting package.json "type": "module". It also bumps the npm package version and reworks the test and build setup to run directly against source files instead of prebuilt dist artifacts.
Breakingv1.0.1
v1.0.1 addresses a crash that occurred when constructing InternMap or InternSet with null. The implementation adds a null check around the iteration logic in both constructors.
v1.0.0
This is the initial v1.0.0 release. There are no release notes beyond stating it is the first release, so no specific features, fixes, or migration details are documented.