Skip to content

Instantly share code, notes, and snippets.

@fercarvo
fercarvo / Cookies.js
Last active February 21, 2024 11:36 — forked from jrivero/jsCookies.js
Pure Javascript Cookies Management
class Cookies {
static get (name) {
if (document.cookie.length === 0)
return null;
var c_start = document.cookie.indexOf(`${name}=`);
if (c_start === -1)
return null;
c_start = c_start + name.length + 1;