docs: readme

This commit is contained in:
Dax Raad
2025-06-20 15:22:41 -04:00
parent 98734ff28c
commit 61160dc220
5 changed files with 48 additions and 24 deletions

View File

@@ -24,6 +24,11 @@ export namespace Storage {
}
})
export async function remove(key: string) {
const target = path.join(state().dir, key + ".json")
await fs.unlink(target).catch(() => {})
}
export async function readJSON<T>(key: string) {
return Bun.file(path.join(state().dir, key + ".json")).json() as Promise<T>
}