0.3.8 • Published 4 years ago

@deepjs/uni-storage v0.3.8

Weekly downloads
18
License
MIT
Repository
-
Last release
4 years ago

uni-storage

封装 uni-app 的 storage,同步取,异步存,API 简单

独立包,无依赖,语义化,使用简单

功能列表

  • set(key, value, time = 3600) // time 单位秒,默认 1h
  • get(key) // 无则返回 undefined
  • remove(key) // 删除
  • clear(bool) // 清除 storage,传 true 则清除所有类型的缓存

使用

import storage from '@deepjs/uni-storage'

// 也可以直接挂载到 Vue 上
Vue.use(storage)

storage.set('name', 'cloudyan', 5);
storage.get('name');

setTimeout(() => {
  storage.get('name');
  storage.remove('name');
  storage.clear('name');
}, 6000);
0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.0

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.4

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago