bunnydb
v1.0.3
Published
JSON database for Bun
Downloads
7
Maintainers
Readme
BunnyDB
JSON database for Bun
Features
- :rabbit: Works with Bun
- :zap: Zero dependencies
- :gear: JSON files in regular folders
Installation
bun i bunnydb
Usage
import { BunnyDB } from "bunnydb"
await BunnyDB.dir("users") // true/false
await BunnyDB.set("users", "id", {id: "id", name: "Bob"}) // true/false
await BunnyDB.remove("users", "id") // true/false
await BunnyDB.exists("users", "id") // true/false
await BunnyDB.get("users", "id") // any/null
await BunnyDB.getAllIDs("users") // []
await BunnyDB.getAll("users") // []
Notes
Use / when creating nested dirs
await BunnyDB.dir("db")
await BunnyDB.dir("db/users")
await BunnyDB.dir("db/nested/dir")
License
MIT