Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

duct-set-cookie

sezaialkan12ISC1.0.2

Easy function to create cookies on the browser

vue, nuxt, cookie, get cookie, cookie information, create cookie, set cookie

readme

Easy function to create cookies on the browser

Demo

https://codeduct.com/duct-set-cookie

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.