3.0.5 • Published 3 years ago
@superherocheesecake/cookie v3.0.5
Cookie
Small helper for Cookie management
Get the package
npm i --save @superherocheesecake/cookie
Import
import { cookie } from '@superherocheesecake/cookie';
Basic Usage
cookie.set(name, value, options);
cookie.get(name); // returned values will always be strings
cookie.remove(name);
Options
path
default is /
path=path
domain
domain=domain
max-age
max-age=max-age-in-seconds
expires
Use this if you want to set an expiry date. If you don't set this value it will be a session cookie.
expires=date-in-GMTString-format
samesite
samesite='secure'|'lax'
Methods
Convert days to UTC
cookie.daysToUTC(30);
3.0.5
3 years ago
3.0.4
3 years ago
3.0.3
3 years ago
3.0.2
3 years ago
3.0.1-canary.4
3 years ago
3.0.1-canary.3
3 years ago
3.0.1
4 years ago
3.0.0
4 years ago