Skip to content

thibka/cookie-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CookieManager

Simple JS cookie manager

Install

ES5

<script src="https://cdn.jsdelivr.net/npm/@thibka/[email protected]/cookie-manager.es5.min.js"></script>

NPM

npm i @thibka/cookie-manager
import CookieManager from '@thibka/cookie-manager';

Usage

CookieManager.setCookie('myCookie', 'Hello.');

// Optionnaly you can set a duration in days
CookieManager.setCookie('myCookie', 'Hello.', 12); // will expire in 12 days
CookieManager.setCookie('myCookie', 'Hello.', 1/24); // will expire in 1 hour

var myCookie = CookieManager.getCookie('myCookie'); // Returns "Hello."

About

Simple JS Cookie Manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published