NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #2664 most downloaded on npm
Curated collection of data structures for the JavaScript/TypeScript.
Latest stable
0.40.8
Last release 14 days ago
08 Nov 2026
Ships unpredictably
gaps range from 1 weeks to 1.2 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
78 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Fixing TrieMap.get type declaration.
TrieMap.get type declaration.BiMap.clear not resetting inverse's size to 0.MultiSet.edit to be a noop when both arguments are the same.FixedDeque/CircularBuffer.get.Vector.get.Fixing SparseMap.delete wrt edge cases.
SparseMap.delete wrt edge cases.SparseQueueSet wrt uint overflow.MultiSet.set.BitSet & BitVector.BitVector iteration when shrunk.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fixing LRUCacheWithDelete & LRUMapWithDelete bugs related to deletion ( @bompus ).
LRUCacheWithDelete & LRUMapWithDelete bugs related to deletion (@bompus).LRUCache, LRUMap, LRUCacheWithDelete & LRUMapWithDelete setpop not correctly returning eviction information when dealing with falsey keys.LRUCacheWithDelete & LRUMapWithDelete bugs related to deletion (@bompus).LRUCache, LRUMap, LRUCacheWithDelete & LRUMapWithDelete setpop not correctly returning eviction information when dealing with falsey keys.Fixing MultiSet.top heap size not being clamped to the set's dimension (@haoran3160-afk).
MultiSet.top heap size not being clamped to the set's dimension (@haoran3160-afk).Fixing LRUMap.setpop & LRUCache.setpop type declaration ( @richardgarnier ).
LRUMap.setpop & LRUCache.setpop type declaration (@richardgarnier).LRUMap.setpop & LRUCache.setpop type declaration (@richardgarnier).Adding sideEffects: false to package.json ( @blowery ).
sideEffects: false to package.json (@blowery).Fixing BloomFilter.from type declaration ( @jmezzacappa ).
BloomFilter.from type declaration (@jmezzacappa).Fixing SparseMap constructor overloads in type declarations.
SparseMap constructor overloads in type declarations.Adding ESM named exports support (@jerome-benoit).
Set operations CommonJS named export collision by renaming it to set (@jerome-benoit).Uint8Vector, Uint8ClampedVector, Int8Vector, Uint16Vector, Int16Vector, Uint32Vector, Int32Vector, Float32Vector, Float64Vector, PointerVector CommonJS named exports (@jerome-benoit).PointerVector TS exports (@jerome-benoit).ReadonlySet in set operations (@yoursunny).Adding ESM named exports support (@jerome-benoit).
Set operations CommonJS named export collision by renaming it to set (@jerome-benoit).Uint8Vector, Uint8ClampedVector, Int8Vector, Uint16Vector, Int16Vector, Uint32Vector, Int32Vector, Float32Vector, Float64Vector, PointerVector CommonJS named exports (@jerome-benoit).PointerVector TS exports (@jerome-benoit).Fixing Float64Vector TS exports (@atombrenner).
Float64Vector TS exports (@atombrenner).FixedDeque #.push & #.pop methods (@jerome-benoit).FixedDeque & CircularBuffer methods.Float64Vector TS exports (@atombrenner).FixedDeque #.push & #.pop methods (@jerome-benoit).FixedDeque & CircularBuffer methods.Slight performance optimization of LRU classes #.setpop method.
#.setpop method.Fixing type declarations of FibonacciHeap, StaticIntervalTree & Vector (@Macil).
FibonacciHeap, StaticIntervalTree & Vector (@Macil).Adding partial type declarations for undocumented utils/typed-arrays.
utils/typed-arrays.Fixing BiMap.get and InverseMap.get types (@rubenferreira97).
BiMap.get and InverseMap.get types (@rubenferreira97).Fixing NaN size issue with MultiSet.remove when removing non-existent keys.
NaN size issue with MultiSet.remove when removing non-existent keys.Fixing typings of low-level structure consuming methods (@jerome-benoit).
Fixing Heap type declarations (@em-ctc).
Heap type declarations (@em-ctc).Adding LRUCacheWithDelete & LRUMapWithDelete (@trivikr & @mrflip).
LRUCacheWithDelete & LRUMapWithDelete (@trivikr & @mrflip).Improving performance of iterator methods across the library.
obliterator.Fixing KDTree typings (@clhuang).
KDTree typings (@clhuang).Refactoring VPTree memory layout.
VPTree memory layout.VPTree.nearestNeighbors edge case.VPTree optimizations.Fixing Heap.replace & Heap.pusphpop types (@wholenews).
Heap.replace & Heap.pusphpop types (@wholenews).* Fixing SparseQueueSet deopt.
SparseQueueSet deopt.Adding TrieMap.update (@wholenews).
TrieMap.update (@wholenews).Adding DefaultWeakMap (@yoursunny).
DefaultWeakMap (@yoursunny).Improved typings for iteration methods (@yoursunny).
* Adding SparseQueueSet.
SparseQueueSet.Enhancing SparseSet performance.
SparseMap.SparseSet performance.* Adding set.overlap.
set.overlap.Fixing build by including missing sort folder.
sort folder.* Adding KDTree. * Adding set.intersectionSize. * Adding set.unionSize. * Adding set.jaccard. * Adding FixedReverseHeap.peek.
KDTree.set.intersectionSize.set.unionSize.set.jaccard.FixedReverseHeap.peek.* Adding PassjoinIndex.
PassjoinIndex.Fixing Heap.nsmallest & Heap.nlargest docs & typings.
Heap.nsmallest & Heap.nlargest docs & typings.Heap.nsmallest & Heap.nlargest not using custom comparator function when n = 1.Fixing BitSet & BitVector iteration methods edge case.
BitSet & BitVector iteration methods edge case.BitSet & BitVector #.select method.Fixing BitSet & BitVector #.size caching edge case.
BitSet & BitVector #.size caching edge case.Fixing BitSet & BitVector #.size caching.
DefaultMap.peek.BitSet & BitVector #.size caching.Stricter TS definitions (--noImplicitAny, --noImplicitReturns) (@pbadenski).
--noImplicitAny, --noImplicitReturns) (@pbadenski).Adding LRUCache.setpop and LRUMap.setpop (@veggiesaurus).
LRUCache.setpop and LRUMap.setpop (@veggiesaurus).Adding LRUCache.peek and LRUMap.peek (@veggiesaurus).
LRUCache.peek and LRUMap.peek (@veggiesaurus).* Fixing usage with TypeScript.
Fixing CircularBuffer and FixedDeque types.
CircularBuffer and FixedDeque types.Changing CircularBuffer semantics to now overwrite values when wrapping around.
FixedDeque.CircularBuffer.unshift.CircularBuffer semantics to now overwrite values when wrapping around.Adding the DefaultMap.autoIncrement factory.
DefaultMap.autoIncrement factory.IncrementalMap.Vector typings.BitVector typings.Fixing custom inspect methods for node >= 10.
* Adding LRUCache. * Adding LRUMap.
LRUCache.LRUMap.Adding #.forEachMultiplicity to MultiSet.
#.forEachMultiplicity to MultiSet.#.forEachAssociation to MultiMap.DefaultMap.Adding Heap.nsmallest & Heap.nlargest.
FixedReverseHeap.Heap.nsmallest & Heap.nlargest.MultiSet.isSubset & MultiSet.isSuperset.#.top to MultiSet.Heap types.FiniteStack to FixedStack.Nothing published for this version
Adding FuzzyMultiMap.dimension.
FuzzyMultiMap.dimension.#.consume to Heap.#.replace to Heap.#.pushpop to Heap.BitSet and BitVector #.toJSON.FiniteStack.from & CircularBuffer.from performance when handling arrays.Heap.from is now linear time.Heap inner logic.CircularBuffer's #.unshift to #.shift.SparseSet.delete return consistency.* Library is now fully typed. * Adding CircularBuffer. * Adding #.toArray to Heap.
CircularBuffer.#.toArray to Heap.Nothing published for this version
Nothing published for this version
Reworking the Trie considerably.
TrieMap.Trie considerably.Nothing published for this version
Improving Vector & BitVector reallocation performance.
StaticIntervalTree.PointerVector.Queue.of.Stack.of.Vector & BitVector reallocation performance.InvertedIndex performance.Nothing published for this version
Adding #.count alias to MultiSet.
FiniteStack.#.keys to MultiSet.#.count alias to MultiSet.#.count alias to MultiMap.#.remove to MultiMap.Vector.from.#.values to Vector.#.entries to Vector.MultiSet..from static methods not taking byte arrays into account.Stack.pop edge cases.Stack performance.Adding #.frequency to MultiSet.
HashedArrayTree.BitVector.#.frequency to MultiSet.#.grow to DynamicArray.#.reallocate to DynamicArray.#.resize to DynamicArray.MultiSet issues.DynamicArray to Vector.DynamicArray.initialLength option to initialCapacity.DynamicArray.allocated to capacity.MultiSet performance.SparseSet memory consumption.Adding #.multiplicity to MultiMap.
#.has to FuzzyMap.#.has to FuzzyMultiMap.#.multiplicity to MultiMap.RangeMap to IncrementalMap.Index to FuzzyMap.MultiIndex to FuzzyMultiMap.DynamicArray initialSize option to initialLength.MultiMap.set performance.BitSet.reset performance.Set.isSubset & Set.isSuperset performance.One column per quarter.