1.0.3 • Published 12 months ago

bunnydb v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

BunnyDB

JSON database for Bun

npm npm GitHub

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

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago