Skip to content

serializeAdminCookie

serializeAdminCookie(value): string

Defined in: packages/core/src/adminCookie.ts:256

Serializes AdminCookieGlobal to its cookie value (JSON, NOT yet URI-encoded — the caller’s own document.cookie/Set-Cookie write does that, the same split parseAdminCookie already draws against decodeURIComponent). No size cap: every field is a small, fixed-size scalar (never an unbounded collection, unlike the collection cookie’s localViews/rowCounts), so it can never approach ADMIN_COOKIE_MAX_BYTES.

Omit<AdminCookieGlobal, "v">

The value to serialize. v is forced to 1 regardless of what’s passed.

string

The JSON string to assign as the cookie’s value.