ixfx
    Preparing search index...

    Class QueueImmutable<V>

    Queue (immutable). See also QueueMutable.

    Queues are useful if you want to treat 'older' or 'newer' items differently. Enqueing adds items at the back of the queue, while dequeing removes items from the front (ie. the oldest).

    let q = queue();           // Create
    q = q.enqueue(`a`, `b`); // Add two strings
    const front = q.peek; // `a` is at the front of queue (oldest)
    q = q.dequeue(); // q now just consists of `b`
    const q = queue({capacity: 5, discardPolicy: `newer`});
    

    Type Parameters

    • V

    Implements

    Index

    Accessors

    Constructors

    Methods

    Properties

    opts: QueueOpts<V>