ixfx
    Preparing search index...

    Namespace Stacks

    Stacks store items in order, like a stack of plates.

    import { Stacks } from "https://unpkg.com/@ixfx/collections/bundle"
    let s = Stacks.immutable();
    s = s.push(`a`, `b`); // Add two strings
    // Peek looks at the top of the stack
    // (ie most recently added)
    s.peek; // `b`
    // Remove item from top of stack
    s = s.pop();
    s.peek // `a`

    Functions

    immutable

    Returns a stack. Immutable. Use Stacks.mutable for a mutable alternative.

    isEmpty
    isFull
    mutable

    Creates a stack. Mutable. Use Stacks.immutable for an immutable alternative.

    peek

    Peek at the top of the stack (end of array)

    pop
    push
    trimStack

    Classes

    StackImmutable

    Stack (immutable)

    StackMutable

    Creates a stack. Mutable. Use StackImmutable for an immutable alternative.

    Interfaces

    IStack

    Stack (immutable)

    IStackImmutable

    Stack (immutable)

    IStackMutable

    Stack (mutable)

    Type Aliases

    StackDiscardPolicy
    StackOpts