@geogirafe/lib-geoportal
    Preparing search index...

    Manages user data storage and retrieval across different storage sources. The class supports localStorage and server as storage options (server-side implementation currently not available). It provides functionality to set, get, save, and delete user data while maintaining the flexibility to target specific paths within the user data object.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Deletes all user data in storage.

      Parameters

      • forceLocalStorage: boolean = false

        Force deletion from local storage regardless of the currently set data source.

      Returns void

    • Delete a specific part of the user data defined by the storage path.

      Parameters

      • storagePath: string

        path in the user data object that will be deleted.

      • forceLocalStorage: boolean = false

        if true, deletes user data in the local storage, ignoring the source.

      Returns void

    • Retrieves a specific part of the user data defined by the storage path.

      Parameters

      • storagePath: string

        path in the user data object to the requested value.

      • forceLocalStorage: boolean = false

        if true, reads user data from the local storage, ignoring the source.

      Returns unknown

      the partial user data object.

    • Saves user data to a specific path in the storage.

      Parameters

      • storagePath: string

        path in the user data object where the value is saved to.

      • newValue: unknown

        user data value to save.

      • forceLocalStorage: boolean = false

        if true, saves user data to the local storage, ignoring the source.

      Returns void