https://github.com/zediculz/vanilladb-flatfile
A Flat-File Database library that stores data as json or toml
https://github.com/zediculz/vanilladb-flatfile
bun bunjs deno flat-file nodejs
Last synced: about 2 months ago
JSON representation
A Flat-File Database library that stores data as json or toml
- Host: GitHub
- URL: https://github.com/zediculz/vanilladb-flatfile
- Owner: zediculz
- Created: 2025-02-08T13:43:13.000Z (over 1 year ago)
- Default Branch: vanilladb-flatfile
- Last Pushed: 2025-04-04T21:35:10.000Z (about 1 year ago)
- Last Synced: 2025-10-06T07:52:54.385Z (9 months ago)
- Topics: bun, bunjs, deno, flat-file, nodejs
- Language: TypeScript
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://jsr.io/@vanilladb/main)
# VanillaDb
A lightweight, flat-file database that stores data in json file:
- 🚀 Zero dependencies
- 🔌 Less API
- 🛠️ Full TypeScript type inference
## Installation
```bash
deno add jsr:@vanilladb/main
```
## Usage
### Basic Class Example
```javascript
import VanillaDb from "@vanilladb/main";
//create VanillaDb
const db = new VanillaDb({
file: "filename.json",
label: "db",
defaultData: [],
log: true
})
//set store new data in db
await db.set({
id: 0,
name: 'john doe'
})
//get returns data in db
const datas = await db.get()
//querystring query uses querystring to get data from db
const result = await db.query("select where index=2")
const done = await db.query("update where index=2 value='newdata'")
```
# License
MIT © Ademujimi Oluwaseyi