Skip to main content

Class: CookieStore

api/src.CookieStore

Hierarchy

  • Map<string, string>

    CookieStore

Constructors

constructor

new CookieStore(request, response, secure, domainOverwrite?)

Parameters

NameType
requestApiRequest
responseApiResponse
secureboolean
domainOverwrite?null | string

Overrides

Map<string, string\>.constructor

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:14

Properties

[toStringTag]

Readonly [toStringTag]: string

Inherited from

Map.__@toStringTag@102092

Defined in

node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:135


domain

Private domain: string

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:11


request

Protected request: ApiRequest

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:9


response

Protected response: ApiResponse

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:10


secure

Private secure: boolean

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:12


size

Readonly size: number

Inherited from

Map.size

Defined in

node_modules/typescript/lib/lib.es2015.collection.d.ts:28


[species]

Static Readonly [species]: MapConstructor

Inherited from

Map.__@species@102238

Defined in

node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:317


octetRegExp

Static Private Readonly octetRegExp: RegExp

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:128

Methods

[iterator]

[iterator](): IterableIterator<[string, string]>

Returns an iterable of entries in the map.

Returns

IterableIterator<[string, string]>

Inherited from

Map.__@iterator@102020

Defined in

node_modules/typescript/lib/lib.es2015.iterable.d.ts:121


add

add(name, value, options?): void

Parameters

NameType
namestring
valuestring
options?SecureCookieStoreSetOptions

Returns

void

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:45


clear

clear(): void

Returns

void

Inherited from

Map.clear

Defined in

node_modules/typescript/lib/lib.es2015.collection.d.ts:22


delete

delete(key): boolean

Parameters

NameType
keystring

Returns

boolean

Inherited from

Map.delete

Defined in

node_modules/typescript/lib/lib.es2015.collection.d.ts:23


entries

entries(): IterableIterator<[string, string]>

Returns an iterable of key, value pairs for every entry in the map.

Returns

IterableIterator<[string, string]>

Inherited from

Map.entries

Defined in

node_modules/typescript/lib/lib.es2015.iterable.d.ts:126


forEach

forEach(callbackfn, thisArg?): void

Parameters

NameType
callbackfn(value: string, key: string, map: Map<string, string>) => void
thisArg?any

Returns

void

Inherited from

Map.forEach

Defined in

node_modules/typescript/lib/lib.es2015.collection.d.ts:24


get

get(key): undefined | string

Parameters

NameType
keystring

Returns

undefined | string

Inherited from

Map.get

Defined in

node_modules/typescript/lib/lib.es2015.collection.d.ts:25


getHostDomain

Private getHostDomain(host): string

Parses a host using the psl library to extract the domain. This is used for the domain of the cookie

Parameters

NameTypeDescription
hoststringThe hot to parse

Returns

string

Either the host in all lower case or the parsed domain, ready for use on cookies

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:110


has

has(key): boolean

Parameters

NameType
keystring

Returns

boolean

Inherited from

Map.has

Defined in

node_modules/typescript/lib/lib.es2015.collection.d.ts:26


insert

Protected insert(name, entry): void

Parameters

NameType
namestring
entrystring

Returns

void

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:53


keys

keys(): IterableIterator<string>

Returns an iterable of keys in the map

Returns

IterableIterator<string>

Inherited from

Map.keys

Defined in

node_modules/typescript/lib/lib.es2015.iterable.d.ts:131


prepare

Protected prepare(name, value, __namedParameters?): string

Parameters

NameType
namestring
valuestring
__namedParametersSecureCookieStoreSetOptions

Returns

string

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:68


remove

remove(name): void

Parameters

NameType
namestring

Returns

void

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:49


set

set(key, value): CookieStore

Parameters

NameType
keystring
valuestring

Returns

CookieStore

Inherited from

Map.set

Defined in

node_modules/typescript/lib/lib.es2015.collection.d.ts:27


values

values(): IterableIterator<string>

Returns an iterable of values in the map

Returns

IterableIterator<string>

Inherited from

Map.values

Defined in

node_modules/typescript/lib/lib.es2015.iterable.d.ts:136


encodeCookieOctet

Static Private encodeCookieOctet(value): string

Parameters

NameType
valuestring

Returns

string

Defined in

projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:130