Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Kukki

The cookie manager.

Hierarchy

  • Kukki

Index

Constructors

Methods

Constructors

constructor

Methods

Static delete

  • Removes the specified cookie.

    Cookies that have been created with a path or domain attribute can only be deleted if those attributes are provided. Cookies with an http attribute cannot be deleted programmatically.

    Parameters

    • key: string

      The name of the cookie.

    • attributes: CookieAttributes

      Additional cookie attributes.

    Returns void

Static get

  • get(key: string): string
  • Retrieves the value of the specified cookie.

    Parameters

    • key: string

      The name of the cookie.

    Returns string

    The value of the cookie, or null if the cookie doesn't exist.

Static has

  • has(key: string): boolean
  • Checks if the specified cookie exists.

    Parameters

    • key: string

      The name of the cookie.

    Returns boolean

    Whether the cookie exists.

Static keys

  • keys(): string[]
  • Returns an array of cookie keys.

    Returns string[]

    The keys.

Static set

  • Sets a new cookie or updates an existing one.

    Parameters

    • key: string

      The name of the cookie.

    • value: string

      The value of the cookie.

    • attributes: CookieAttributes

      Optional cookie attributes.

    Returns void