coki
Version:
这是一个极简的Cookie工具!
36 lines (25 loc) • 593 B
Markdown
# coki
> 这是一个极简的Cookie工具。
## Build Setup
``` bash
# 安装coki
npm install coki
# 新增数据
coki({
username:'HongZhi',
age:27
})
# 获取数据
coki('username')
# 新增数据,顺便设置过期时间
coki({
username:'HongZhi',
age:27
},7)
# 删除数据
coki({
username:null, // 设置为 null 即可,因为null不占用浏览器空间
age:null
},0) // 或者将过期时间设置为0,就会马上过期
```
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).