Options
All
  • Public
  • Public/Protected
  • All
Menu

Type Parameters

  • T = string

Hierarchy

  • CookiesStatic

Index

Properties

converter: Required<export=.Converter<string>>

Methods

  • get(name: string): undefined | string | T
  • get(): {}
  • Read cookie

    Parameters

    • name: string

    Returns undefined | string | T

  • Read all available cookies

    Returns {}

    • [key: string]: string
  • Create a cookie

    Parameters

    Returns undefined | string

  • Cookie attribute defaults can be set globally by creating an instance of the api via withAttributes(), or individually for each call to Cookies.set(...) by passing a plain object as the last argument. Per-call attributes override the default attributes.

    Parameters

    Returns export=.CookiesStatic<T>

  • Create a new instance of the api that overrides the default decoding implementation. All methods that rely in a proper decoding to work, such as Cookies.remove() and Cookies.get(), will run the converter first for each cookie. The returned string will be used as the cookie value.

    Type Parameters

    • TConv = string

    Parameters

    Returns export=.CookiesStatic<TConv>

Generated using TypeDoc