My Simple Cookie
Simple cookie handling module
Setting a cookie:
cookies.set(cookieName, cookieValue[, opts]);
var cookies = ;cookies;
Will create a new cookie named newCookie with the value newCookie with 1 day expiration and / as path
cookie value should only be a string
Updating a cookie:
cookies.update(cookieName, cookieValue[, opts]);
cookies; // Or cookies;
Retrieving a cookie:
cookies.get(cookieName);
cookies;
Will return the value of "newCookie"
Removing a cookie
cookies.remove(cookieName);
cookies;
Will delete the cookie "newCookie"
Options:
expires : (Number) Number of second till cookie expires in seconds {default to : closing browser}.
path : (String) Path of the cookie {default to : / }.
domain : (String) domain of the cookie {default to : current domain }.
httponly : (Boolean) should we flag the cookie as httpOnly ? {default to : false }.
secure : (Boolean) should we flag the cookie as secured ? {default to : false }.