Creates a new TreeMultiMap.
// Standard usage with entries
const mmap = new TreeMultiMap([['a', ['x', 'y']], ['b', ['z']]]);
// Using toEntryFn to transform raw objects
const players = [{ score: 100, items: ['sword'] }, { score: 200, items: ['shield', 'bow'] }];
const mmap = new TreeMultiMap(players, { toEntryFn: p => [p.score, p.items] });
Number of distinct keys.
Total number of values across all buckets (Σ bucket.length).
Creates a shallow clone of this map.
Bucket length for a key (missing => 0).
Deletes a key and its entire bucket.
Creates a new map with entries that pass the predicate.
Whether the map contains the given key.
TreeMultiMap (ordered MultiMap) — key → bucket (Array of values).
Semantics (RFC):
get(key)returns a live bucket reference.[K, V[]].first/last/ceiling/...) return entry tuples like TreeMap.Example