Skip to main content

Class: Cookie

Represents a cookie object.

Constructors

constructor

new Cookie()

Methods

parseCookie

Static parseCookie(cookie): string

Converts an ICookie object into a cookie string.

Throws

If the ltuid or ltoken key is missing in the ICookie object.

Parameters

NameTypeDescription
cookieICookieThe ICookie object to convert.

Returns

string

A string representing the cookie.

Defined in

src/cookie/cookie.ts:81


parseCookieString

Static parseCookieString(cookieString): ICookie

Parses a cookie string and returns a parsed ICookie object.

Throws

when ltuid or ltoken keys are not found in the cookie string.

Parameters

NameTypeDescription
cookieStringstringThe cookie string to be parsed.

Returns

ICookie

  • A parsed ICookie object.

Defined in

src/cookie/cookie.ts:20