@void-cache/indexdb
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@void-cache/indexdb

npm (scoped)

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')

Readme

Keywords

none

Package Sidebar

Install

npm i @void-cache/indexdb

Weekly Downloads

9

Version

0.1.3

License

MIT

Unpacked Size

4.98 kB

Total Files

6

Last publish

Collaborators

  • whitekite