A JavaScript skip list implementation of Redis Sorted Sets (sorted-map/redis-sorted-map fork). v0.1.0 (latest, stable). Provides O(log N) average-time add, remove, rank, range, score, and cardinality operations. Supports intersection of multiple sets. Members can be any primitive value (strings, symbols, objects). No external dependencies. Not actively maintained, but functional for basic use cases.
npm install tlhunter-sorted-setNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: creating a set, adding members with scores, querying scores, range queries, and static intersect.
Consider alternatives like redis-sorted-set or implementing your own.
Check return value for null to determine if member existed.
Prefer .range() for consistency with Redis.
If you need a SortedSet, wrap result: new SortedSet().add(...) (not directly supported).
Negative indices are supported but not documented; test behavior.
Always pass max explicitly or use null for unbounded.
Use const SortedSet = require('tlhunter-sorted-set');const z = new SortedSet(); then z.add(member, score);
npm install tlhunter-sorted-set
Use primitive values (string, number, symbol) as members.
No dependency data recorded yet.