Options
Menu

Helper fuctions to perform cookie tasks.

Index

Functions

deleteCookie

  • deleteCookie(param: string): boolean
  • Removes a cookie parameter.

    Parameters

    • param: string

      The cookie parameter to remove.

    Returns boolean

getValue

  • getValue(param: string, fallback?: string): string | boolean
  • Retrieve value of a cookie parameter.

    Parameters

    • param: string

      Cookie parameter to read.

    • Optional fallback: string

    Returns string | boolean

setValue

  • setValue(param: string, value?: string, expires?: boolean, timeOut?: number): boolean
  • Changes or adds a cookie parameter.

    Parameters

    • param: string

      New cookie parameter or parameter to change.

    • Optional value: string

      Value of the cookie parameter.

    • Optional expires: boolean

      Shall expire 365 days from now.

    • Optional timeOut: number

      Time in ms to be added to current year. Overrides expires.

    Returns boolean