@creator.co/module-identity-client - v1.1.11
    Preparing search index...

    Class for managing local cookies using CookieWrap library.

    Index

    Constructors

    Methods

    • Asynchronously removes a key or an array of keys from the cookie storage.

      Parameters

      • key: string | string[]

        The key(s) to be removed from the cookie storage.

      Returns Promise<unknown>

      A promise that resolves once the key(s) have been removed.

    • Asynchronously retrieves the value associated with the given key from the cookie engine.

      Parameters

      • key: string

        The key to look up in the cookie engine.

      Returns Promise<undefined | null | string>

      A promise that resolves to the value associated with the key, or null if the key is not found, or undefined if the value is not set.

    • Sets a default value for a given key in the cookies with the specified expiration period.

      Parameters

      • key: string

        The key to set the default value for.

      • val: string

        The default value to set for the key.

      Returns Promise<null>

      A promise that resolves when the default value is set in the cookies.

    • Asynchronously sets a long-lived value in the cookies with the given key and value.

      Parameters

      • key: string

        The key to set in the cookies.

      • val: string

        The value to associate with the key.

      Returns Promise<null>

      A promise that resolves when the value is successfully set in the cookies.

    • Asynchronously sets a cookie value with the given key, value, and time-to-live (TTL).

      Parameters

      • key: string

        The key of the cookie.

      • val: string

        The value to set for the cookie.

      • ttl: number

        The time-to-live for the cookie in milliseconds.

      Returns Promise<null>

      A Promise that resolves to null once the cookie is set.