Skip to main content

Class: CookieStore

@sapphire/plugin-api.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@863896

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@864465

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@863953

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