Nom nom nom! The easy way to cook and eat cookies (yummy!) in #JavaScript
.
Install via npm
$ npm install putainde-cookie
Usage
cookie
var cookie =
Cookie.set(name, value[, opts])
cookie; var expires = ;expires;cookie;cookie;
Cookie.get(name)
cookie; // 'nom nom nom'
Cookie.remove(name[, opts])
// bye-bye!Cookie;Cookie;
Sugar!
Cookie fits well with the excellent lib moment.js.
First of all, install moment:
$ bower install moment
Now, you can use something like this:
// Cookie should be eaten before the end of the dayCookie;
Attribution
Cookie designed by Caroline Lancaster from The Noun Project.