@esfx/collections-linkedlist Package

    Provides the LinkedList class, a linked-list implementation that utilizes @esfx/collection-core and @esfx/equatable.

    Installation

    npm i @esfx/collections-linkedlist
    

    Usage

    • TypeScript
    • JavaScript (CommonJS)
    import { LinkedList, LinkedListNode } from "@esfx/collections-linkedlist";
    
    const list = new LinkedList<string>();
    const n1: LinkedListNode<string> = list.push("first");
    const n2: LinkedListNode<string> = list.push("second");
    n2.value = "second updated";
    [...list]; // first,second updated
    
    const { LinkedList } = require("@esfx/collections-linkedlist");
    
    const list = new LinkedList();
    const n1 = list.push("first");
    const n2 = list.push("second");
    n2.value = "second updated";
    [...list]; // first,second updated
    

    Classes

    LinkedList

    A collection representing a [doubly-linked list](https://en.wikipedia.org/wiki/Doubly_linked_list).

    LinkedListNode

    A node in a [doubly-linked list](https://en.wikipedia.org/wiki/Doubly_linked_list).

    • Improve this Doc
    Generated by DocFX