aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils/setCookie.ts
blob: 421fe81f6086a3fdd6c25cc2b2f5574cc609b502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* eslint @typescript-eslint/no-explicit-any: "off" */

/**
 * set a cookie
 * the version from w3schools expects these to expire
 * @param {string} cname The name of the cookie to return
 * @param {any} value The value of that cookie option
 */
const setCookie = (cname: string, value: any) => {
  document.cookie = `${cname}=${value};SameSite=Strict`;
};
export default setCookie;