0.1.3 • Published 2 years ago
@void-cache/indexdb v0.1.3
@void-cache/indexdb
void-cache 的indexDB 实现
🇨🇳国内用户可访问国内镜像
直接使用
Demo
import {indexDBCache} from '@void-cache/indexdb'
await indexDBCache.get('foo')
await indexDBCache.set('foo', 'bar')
await indexDBCache.has('foo')
await indexDBCache.clear()
await indexDBCache.remove('foo')
创建一个新实例使用
Demo
import {createIndexDBCache} from '@void-cache/indexdb'
export const store = createIndexDBCache({
dbName: 'void-cache',
storeName: 'void-cache',
})
await store.get('foo')
await store.set('foo', 'bar')
await store.has('foo')
await store.clear()
await store.remove('foo')