Mnemonist
Curated collection of data structures for the JavaScript/TypeScript language.
Install / Use
/learn @Yomguithereal/MnemonistREADME
Mnemonist
Mnemonist is a curated collection of data structures for the JavaScript language.
It gathers classic data structures (think heap, trie etc.) as well as more exotic ones such as Buckhard-Keller trees etc.
It strives at being:
- As performant as possible for a high-level language.
- Completely modular (don't need to import the whole library just to use a simple heap).
- Simple & straightforward to use and consistent with JavaScript standard objects' API.
- Completely typed and comfortably usable with Typescript.
Installation
npm install --save mnemonist
Documentation
Full documentation for the library can be found here.
Classics
Low-level & structures for very specific use cases
- Circular Buffer
- Fixed Deque
- Fibonacci Heap
- Fixed Reverse Heap
- Fixed Stack
- Hashed Array Tree
- Static DisjointSet
- SparseQueueSet
- SparseMap
- SparseSet
- Suffix Array
- Generalized Suffix Array
- Vector
Information retrieval & Natural language processing
Space & time indexation
Metric space indexation
Probabilistic & succinct data structures
Utility classes
Note that this list does not include a Graph data structure, whose implementation is usually far too complex for the scope of this library.
However, we advise the reader to take a look at the graphology library instead.
Don't find the data structure you need? Maybe we can work it out together.
Contribution
Contributions are obviously welcome. Be sure to lint the code & add relevant unit tests.
# Installing
git clone git@github.com:Yomguithereal/mnemonist.git
cd mnemonist
npm install
# Linting
npm run lint
# Running the unit tests
npm test
License
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
