A lightweight, easy-to-use cookie management module for client-side JavaScript.
This module provides functions for getting, setting, and removing cookies, as well as
utilities for working with JSON data and checking browser cookie support.
Example
importcookiefrom'kitto';
// Set a cookie cookie.set('user', { id:123, name:'John' }, { expires:7 });
// Get a cookie constuser = cookie.get('user', true); // true to parse JSON
// Remove a cookie cookie.remove('user');
// Check if cookies are enabled if (cookie.is_enabled()) { console.log('Cookies are supported and enabled'); }
Version
2.2.0
Remarks
A lightweight, easy-to-use cookie management module for client-side JavaScript. This module provides functions for getting, setting, and removing cookies, as well as utilities for working with JSON data and checking browser cookie support.
Example