(key: string, value: string, expDays: number = 6)
| 24 | }; |
| 25 | |
| 26 | export 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 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected