A utility class for managing local storage values.

  • Type Parameters

    • T = Record<string, any>

      The type of the value to be stored in local storage.

    Parameters

    • STORAGE_KEY: string

      The key to use when storing the value in local storage.

    Returns { clear: () => void; getValue: () => null | T; setValue: (value: T) => void }

    • An instance of the createLsManager class.
    • clear: () => void
    • getValue: () => null | T

      Returns the value stored in localStorage using the specified key.

    • setValue: (value: T) => void

      Sets a value in the local storage.

      • If the local storage exceeds the quota.