@beeeku/cookieplus
v0.0.5
Published
```sh npm install @beeeku/cookieplus yarn add @beeeku/cookieplus ```
Downloads
5
Readme
Nicer way to manage your cookies
Install
npm install @beeeku/cookieplus
yarn add @beeeku/cookieplusImporting library
import { getCookie, setCookie, removeCookie, clearCookie } from '@beeeku/cookieplus';Usage
const times = parseInt(getCookie('times'), 10) || 0;
setCookie('times', times + 1);
removeCookie('times');
clearCookie();Demo
API
getCookie(key)
Return the cookie value for key.
setCookie(key, value, opts={})
Set the cookie at key to value with optional parameters expires and path.`.
removeCookie(key)
Removes cookie value stored at key.`.
clearCookie()
Removes all currently available cookies.
Author
👤 Bikash Dash
Show your support
Give a ⭐️ if this project helped you!
