SvelteKitCookies
The subset of SvelteKit’s Cookies API this adapter depends on.
Kept structural so it works against the real type without importing kit
at runtime (the adapter ships in a browser/edge bundle too).
Methods
Section titled “Methods”delete()
Section titled “delete()”delete(
name,opts?):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
opts? |
{ path?: string; } |
opts.path? |
string |
Returns
Section titled “Returns”void
get(
name):string|undefined
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
Returns
Section titled “Returns”string | undefined
set(
name,value,opts?):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
value |
string |
opts? |
{ expires?: Date; httpOnly?: boolean; maxAge?: number; path?: string; sameSite?: "lax" | "strict" | "none"; secure?: boolean; } |
opts.expires? |
Date |
opts.httpOnly? |
boolean |
opts.maxAge? |
number |
opts.path? |
string |
opts.sameSite? |
"lax" | "strict" | "none" |
opts.secure? |
boolean |
Returns
Section titled “Returns”void