Locker class for the Mystery Master Logic Puzzle Solver.

Michael Benson

2024-12-20

Constructors

Properties

ok: boolean = ...

True if HTML5 local storage is supported, otherwise false.

Methods

  • Gets boolean value from storage given its key.

    Parameters

    • key: string

      Key.

    • def: boolean

      Default value.

    Returns boolean

    Boolean value.

  • Gets numeric value from storage given its key.

    Parameters

    • key: string

      Key.

    • def: number

      Default value.

    Returns number

    Numeric value.

  • Gets string value from storage given its key.

    Parameters

    • key: string

      Key.

    • def: string

      Default value.

    Returns string

    String value.

  • Sets value to storage given its key.

    Parameters

    • key: string

      Key.

    • val: any

      Value.

    Returns void

  • Determines if HTML5 local storage exists.
    Note: "window" is undefined for node.js.

    Returns boolean

    True if storage exists, otherwise false.