-
Notifications
You must be signed in to change notification settings - Fork 16
/
cookie.node.txt
27 lines (20 loc) · 1.96 KB
/
cookie.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
COOKIE
ALTERNATIVES ==> #See js-cookie
VERSION ==> #0.6.0
COOKIE.parse #Parses Cookie: COOKIE [C]
('COOKIE'[, OPTS])->COOKIE_OBJ#COOKIE_OBJ: VAR: 'VAL'
#'VAL' uses OPTS.decode(STR)->'VAL' (def: decodeURIComponent())
COOKIE.serialize #Stringifies to Set-Cookie: COOKIE [S]
('VAR','VAL'[,OPTS])->'COOKIE'#OPTS:
# - domain STR
# - path STR
# - expires DATE
# - maxAge NUM
# - secure BOOL
# - httpOnly BOOL
# - sameSite 'strict|lax|none'
# - priority 'low|medium|high'
# - partitioned BOOL
#Uses OPTS.encode('VAL')->STR (def: encodeURIComponent())