A storage implementation that uses a browser Storage API (defaults to localStorage).

Type Parameters

  • T

Hierarchy

Implements

Constructors

Properties

errorOnFailure: boolean
log: ILogger
prefix: string
storage: Storage
totalSize: number = ...

The total possible size of storage in bytes.

Accessors

Methods

  • Determine whether localStorage is available.

    Returns boolean

    true if localStorage is available, false otherwise

  • Calculate how many bytes of storage are in use. If no key is given, calculate for all keys.

    Parameters

    • Optional key: string

    Returns number

Generated using TypeDoc