Skip to content

parseCookie

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

Import

import { parseCookie } from "@account-kit/core";

Parameters

cookie

string the cookie string to parse

key

string the key of the cookie to parse

Returns

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