Bluesky app fork with some witchin' additions 馃挮
witchsky.app
bluesky
fork
client
1import {clear, createStore, del, get, set} from 'idb-keyval'
2
3import {type DB} from '#/storage/archive/db/types'
4
5export function create({id}: {id: string}): DB {
6 const store = createStore(id, id)
7
8 return {
9 get(key: string) {
10 return get(key, store)
11 },
12 set(key: string, value: string) {
13 return set(key, value, store)
14 },
15 delete(key: string) {
16 return del(key, store)
17 },
18 clear() {
19 return clear(store)
20 },
21 }
22}