jscookie
A tiny js cookie utility to get, set, and expire cookies.
How to use
Install
- NPM:
npm install jscookie
Import the module
var jscookie = ;
Set a cookie
// Simple Session Cookiejscookie;
or
// Advanced Optionsjscookie;
Setting a cookie exdays to false
, or ommitting the property, will create a session only cookie..
Get a cookie value
jscookie;
Expire a cookie value
jscookie;