parseCookie

1function parseCookie(cookie, key): undefined | string;

Defined in: account-kit/core/src/utils/cookies.ts:118

Helper function that can be used to parse a cookie string on the server or client

Parameters

ParameterTypeDescription

cookie

string

the cookie string to parse

key

string

the key of the cookie to parse

Returns

undefined | string

the value of the cookie given a key if it exists, otherwise undefined