Data structures for typescript.
⚙️ API
npm install @zhelvis/structure-ts
| Module | API | Benchmarks | Description |
|---|---|---|---|
Queue |
Queue API | Queue Benchmarks | Queue based on doubly linked list, FIFO principle. |
RingBuffer |
RingBuffer API | RingBuffer Benchmarks | Circular buffer for efficient data streams, queues, stacks. |
History |
History API | History Benchmarks | Array-like structure with undo/redo, based on RingBuffer. |
Diff |
computeDiff, applyDiff, revertDiff | Diff Benchmarks | Utilities for deep differences, applying and reverting changes. |
To run this project, you need to have Bun installed.
To install dependencies, run:
bun install
To run tests, use:
bun test
To run the linter, use:
bunx biome check
To build the project, use:
bun run build
Note: Do not use
bun builddirectly, as it runs default bundler, which is not configured for this project. Usebun run buildinstead, which uses the custom build script defined inpackage.json.