1.0.0 • Published 3 years ago

@jswork/next-cookie v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

next-cookie

A simple, lightweight JavaScript API for handling browser cookies for next.

version license size download

installation

npm install -S @jswork/next-cookie

apis

apiparamsdescription
getinKeyget single key cookey
gets-get all key cookey
setinKey,inValue,inOptionsset cookie with options({ path:'/', expires: ''})
setsinObject,inOptionsset cookie with object;
delinKeydel the key
delsinArraydel keys
clear-del all cookies

usage

import NxCookie from '@feizheng/next-cookie';

// code goes here:
NxCookie.get
NxCookie.gets
NxCookie.set
NxCookie.sets
NxCookie.del
NxCookie.dels
NxCookie.clear

resources

license

Code released under the MIT license.