Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
11 lines
365 B
TypeScript
11 lines
365 B
TypeScript
import type { SerializeOptions } from "cookie";
|
|
import { parseCookie, stringifySetCookie } from "cookie";
|
|
|
|
export function parseCookies(cookieString: string) {
|
|
return parseCookie(cookieString);
|
|
}
|
|
|
|
export function setClientCookie(name: string, value: string, options: SerializeOptions = {}) {
|
|
document.cookie = stringifySetCookie({ name, value, ...options });
|
|
}
|