Simple JS cookie manager
<script src="https://cdn.jsdelivr.net/npm/@thibka/[email protected]/cookie-manager.es5.min.js"></script>
npm i @thibka/cookie-manager
import CookieManager from '@thibka/cookie-manager';
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."