3.1.3 • Published 2 years ago

cookey v3.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Cookey Installation

npm i cookey

import { Cookey } from "cookey";

Set Cookie

//
const key = "username";
const value = "john doe";
const date = new Date();
const hour = 3;
const path = "/";

const myCookie = new Cookey(key, value, date, hour, path);

//////// <OR> ////////

const myCookie = new Cookey();

const cookieString = Cookey.createCookieString(key, value, date, hour, path); // create cookie String

myCookie.setCookie = cookieString;

Get All Cookie

//

Cookey.getCookie; // [{key: "key1", value: "value1"},{key: "key2", value: "value2"} ]

Get All Cookie Keys

//

Cookey.getCookieKeys; // ['key1', 'key2']

Has Cookie Key

//

Cookey.hasCookieKey(key); // true | false

Get Cookie Value

//

Cookey.getCookieValue("key1"); // 'value1'

Delete Cookie

//

Cookey.deleteCookie(key, path);

//////// <OR> ////////

Cookey.deleteCookie("key1");
3.1.3

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago