Type Parameters

  • PrefsType = object

Constructors

Properties

Methods

Constructors

Properties

storageKey: string = 'ar-prefs'

Methods

  • Gets the value from localStorage for the given key, or the default value if the key is not found.

    Type Parameters

    • T = any

    Parameters

    • Optional key: Path

      The key to get from localStorage.

    • Optional defaultValue: T

      The default value to return if the key is not found.

    Returns undefined | PrefsType | T

    The value from localStorage or the default value.