Skip to content

A tiny script that takes care of all the cookie related problems in JavaScript

License

Notifications You must be signed in to change notification settings

thealjey/awesome-cookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

awesome-cookie

A tiny script that takes care of all the cookie related problems in JavaScript. Read about the motivation behind this script here.

/** Usage example */
//set a cookie
Cookie.set('name', 'John Doe');
//optionally specify the number of days for which the cookie should be valid
Cookie.set('age', 35, 365);
//retrieve a value
Cookie.get('name');
//check if a value exists
if (null !== Cookie.get('bogus')) {}
//or
if (Cookie.get('bogus')) {}
//remove a cookie
Cookie.remove('name');

About

A tiny script that takes care of all the cookie related problems in JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published