Kind: global namespace
- store :
object
遍历 store
Kind: static method of store
Param | Type | Description |
---|---|---|
callback | function |
参数为key, val(过期key的val在localstorage有 值,但取值会为空) |
判断key是否过期,没有返回key的值,过期返回false
Kind: static method of store
Returns: expired
Param | Type |
---|---|
key | string |
通过key获取store的value值(不包含过期的)
Kind: static method of store
Returns: vaule || object
Param | Type | Description |
---|---|---|
key | string |
可以为string或空,为空时取所有的localstorage |
删除store某个key及值
Kind: static method of store
Returns: store
Param | Type | Description |
---|---|---|
key | string |
string |
清除所有store存储
Kind: static method of store
Returns: store
Param | Type | Description |
---|---|---|
key | string |
string |
清除所有已过期的store存储, 运行时即执行
Kind: static method of store
Returns: store
Param | Type | Description |
---|---|---|
key | string |
string |
判断某key是否存在
Kind: static method of store
Returns: boolean
Param | Type | Description |
---|---|---|
key | string |
string |
获取store已存储的大小
Kind: static method of store
Returns: int
Param | Type | Description |
---|---|---|
unit | string |
单位默认返回bytes,可以为KB, MB; |
The MIT License
Copyright (c) 2015 Joe github.com@ccjoe