@jimmymos/dom-cookies-helper

1.0.10 • Public • Published

@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');

Readme

Keywords

none

Package Sidebar

Install

npm i @jimmymos/dom-cookies-helper

Weekly Downloads

1

Version

1.0.10

License

ISC

Unpacked Size

2.71 kB

Total Files

3

Last publish

Collaborators

  • jimmymos