elo7-cookie-amd
v1.1.4
Published
Browser cookie management
Downloads
1,235
Readme
Cookie-amd
Cookie-amd browser cookie library
Cookie.js is a library that manipulates browser cookie. This library uses amd structure.
Install
Install with Npm: npm install elo7-cookie-amd
Dependency
Cookie-amd depends on an amd implementation. We suggest define-async implementation for dependency lookup.
Methods
get
.get(name)
Description:
Returns a the cookie value.
Sample:
define(['cookie'], function(cookie) {
cookie.get('cookie-name');
});
set
.set(name, value, days)
Description:
Creates or rewrite a cookie value with a defined expiration time in days.
Sample:
define(['cookie'], function(cookie) {
cookie.set('cookie-name', 'value', 1);
});
License
Cookie-amd is released under the BSD. Have at it.
Copyright :copyright: 2015 Elo7