cookie-storge-api
v1.0.2
Published
cookie set, get
Downloads
4
Maintainers
Readme
Cookie With Storage APIS
#install
npm install cookie-storge-api
example
var cookieStorgeApi = require("cookie-storge-api")
var cookie = new cookieStorgeApi();
options = {
maxage: 1000000,
domain: 'https://*.com',
path: '/pa',
expires: new Date(),
secure: true,
maxage: 100,
}
cookie.setItem('name', 'liming', options)
cookie.setItem('age', '10', options)
cookie.getItem('age', '10', options)
cookie.getAllItems()
cookie.removeItem('name')
cookie.clear()