@zhelvis/structure-ts
    Preparing search index...

    @zhelvis/structure-ts

    structure-ts

    Data structures for typescript.

    ⚙️ API

    🎮 Playground

    npm install @zhelvis/structure-ts
    
    • Queue - ⚙️ API 🔬 Benchmarks A queue is a data structure based on doubly linked list that follows the FIFO (first-in, first-out) principle.

    • RingBuffer - ⚙️ API 🔬 Benchmarks A ring buffer (or circular buffer) is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. It is particularly useful for buffering data streams and implementing memory efficient queues and stacks.

    • History - ⚙️ API 🔬 Benchmarks A history is an array-like structure with undo/redo functionality based on RingBuffer.

    • Diff utils - 🔬 Benchmarks Utils to deal with deep differences between two structures.

      • computeDiff ⚙️ API Computes the deep difference between two values.
      • applyDiff ⚙️ API Apply a computed difference to a structure.
      • revertDiff ⚙️ API Revert a structure to its previous state using a difference.

    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 build directly, as it runs default bundler, which is not configured for this project. Use bun run build instead, which uses the custom build script defined in package.json.