forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import {MMKV} from '@bsky.app/react-native-mmkv'
2
3import {type DB} from '#/storage/archive/db/types'
4
5export function create({id}: {id: string}): DB {
6 const store = new MMKV({id})
7
8 return {
9 get(key: string) {
10 return store.getString(key)
11 },
12 set(key: string, value: string) {
13 return store.set(key, value)
14 },
15 delete(key: string) {
16 return store.delete(key)
17 },
18 clear() {
19 return store.clearAll()
20 },
21 }
22}