npm.io
1.1.0 • Published 6 years ago

sweet-cookie

Licence
MIT
Version
1.1.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0

To create a cookie:

setCookie(key, value, options)

optional argument; options = { expires, path } expires for cookie expiry date and path for cookie path

To append to an existing cookie:

appendCookie(key, value, specialCharacter)

specialCharacter: the character between cookie values. it is optional, default value is comma.

To convert the cookie into an object:

parseCookie()

To get a specific cookie:

getCookie(key)

to delete a cookie:

deleteCookie(key)