Nicer way to manage your cookies
npm install @beeeku/cookieplus
yarn add @beeeku/cookieplus
import { getCookie, setCookie, removeCookie, clearCookie } from '@beeeku/cookieplus';
const times = parseInt(getCookie('times'), 10) || 0;
setCookie('times', times + 1);
removeCookie('times');
clearCookie();
Return the cookie value for key
.
Set the cookie at key
to value
with optional parameters expires
and path
.`.
Removes cookie value stored at key
.`.
Removes all currently available cookies.
Implemented with typescript from https://github.com/substack/cookie-cutter
👤 Bikash Dash
- Website: https://bika.sh
- Twitter: @beeeku
- Github: @beeeku
- LinkedIn: @beeeku
Give a ⭐️ if this project helped you!