MCPcopy Create free account
hub / github.com/cartesiancs/map3d / setCookie

Function setCookie

src/utils/cookie.ts:26–31  ·  view source on GitHub ↗
(key: string, value: string, expDays: number = 6)

Source from the content-addressed store, hash-verified

24};
25
26export const setCookie = (key: string, value: string, expDays: number = 6) => {
27 const date = new Date();
28 date.setTime(date.getTime() + expDays * 24 * 60 * 60 * 1000);
29 const expires = date.toUTCString();
30 document.cookie = `${key}=${value}; expires=${expires}; path=/`;
31};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected