duct-set-cookie
v1.0.2
Published
Easy function to create cookies on the browser
Downloads
3
Readme
using duct-set-cookie
Easy function to create cookies on the browser
Demo
https://codeduct.com/duct-set-cookie
duct-set-cookie setup
npm
npm i duct-set-cookie
Add the duct-set-cookie package in the component you want to use after installation.
import setCookie from "duct-set-cookie"
ready to use
setCookie("cookieName", "value", 60);
The setCookie function takes 3 values. The 1st value is the Cookie name, the 2nd value is the value of the Cookie, and the 3rd value is the time the cookie will remain in seconds.