1.1.1 • Published 1 year ago

@conedevelopment/qkie v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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');
1.1.1

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago