sai-cookie
v1.3.0
Published
cookie library
Downloads
1
Readme
sai cookie library
- cookie example
cookie.setItem('name', 'min', {minute: 2})
cookie.setItem('age', 37, { minute: 2 })
method
cookie all list
cookie.list() // ["name=min", " age=37"]
cookie key list
cookie.listKey() // ["name", "age"]
cookie get value
cookie.getItem('name') // min
cookie set item
cookie.setItem('age', 37, { day: 1 }) // key, value,expires
cookie remove item
cookie.remove('name') // items is key, value remove
cookie remove value item
cookie.removeValue('name') // items is value remove
cookie search item
cookie.search('name') // name=min
expires list
second
minute
hour
day
expires example
cookie.setItem('name', 'min', { second: 10 })
cookie.setItem('name', 'min', { minute: 10 })
cookie.setItem('name', 'min', { hour: 1 })
cookie.setItem('name', 'min', { day: 1 })
domain example
cookie.setItem('name', 'min', { second: 10 }, document.domain)
cookie.setItem('name', 'min', { minute: 10 }, 'www.naver.com')