@conedevelopment/qkie

1.1.1 • Public • Published

qkie - Simple cookie management

Installation

npm install @conedevelopment/qkie

# or

yarn add @conedevelopment/qkie

Usage

import Cookie from '@conedevelopment/qkie';

const handler = new Cookie();

Writing Cookies

handler.set('theme', 'dark');

// Passing extra options
handler.set('theme', 'dark', new Date('2024-10-10'), '/', {
    SameSite: 'Lax',
    Secure: true,
});

Reading Cookies

let theme = handler.get('theme');

// With default value

let theme = handler.get('theme', 'dark');

Checking Cookies

if (handler.isset('theme')) {
    //
}

Deleting Cookies

handler.remove('theme');

Readme

Keywords

Package Sidebar

Install

npm i @conedevelopment/qkie

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

5.13 kB

Total Files

6

Last publish

Collaborators

  • iamgergo
  • adamlaki