Stone.js API
    Preparing search index...

    Class representing a Cookie.

    Index
    • Parameters

      • name: string

        Cookie name.

      • value: unknown

        Cookie value.

      • options: CookieOptions = {}

        Cookie options.

      Returns Cookie

    name: string
    options: CookieOptions
    value: unknown
    • Clone the cookie with new name, value, and options.

      Parameters

      • value: unknown

        New cookie value.

      • options: CookieOptions = {}

        New cookie options.

      Returns Cookie

      A new cookie instance.

    • Get the cookie value.

      Type Parameters

      • ValueType = unknown

      Returns ValueType

      The cookie value.

    • Serialize the cookie value.

      Returns string

    • Set expiration date for the cookie.

      Parameters

      • value: Date

        Expiration date.

      Returns this

    • Set secure flag for the cookie.

      Parameters

      • value: boolean

        Whether the cookie is secure.

      Returns this

    • Create a Cookie.

      Parameters

      • name: string

        Cookie name.

      • value: unknown

        Cookie value.

      • options: CookieOptions = {}

        Cookie options.

      Returns Cookie