@jimmymos/dom-cookies-helper
v1.0.10
Published
DOM cookies helper
Downloads
3
Readme
@jimmymos/dom-cookies-helper
Allow to set, get and erase cookie easily with Javascript
import { getCookie, setCookie, eraseCookie } from "@jimmymos/dom-cookies-helper"
Get cookie
getCookie('cookieName');
Set cookie
setCookie('cookieName', 'cookieValue');
// Expiration can be set by adding a 3rd parameter:
// {
// "expireMode": "day || hour",
// "expire" : int
// }
Erase cookie
eraseCookie('cookieName');