summaryrefslogtreecommitdiff
path: root/srv/src/http/static/utils.js
blob: 96a295005aaf743bdd42b45023de7aae76942cbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
const cookies = {};
const cookieKVs = document.cookie
  .split(';')
  .map(cookie => cookie.trim().split('=', 2));

for (const i in cookieKVs) {
  cookies[cookieKVs[i][0]] = cookieKVs[i][1];
}

export {
  cookies,
}