https://github.com/sergiogotuzzo/belin.db
A module for creating a local JSON-based database
https://github.com/sergiogotuzzo/belin.db
database db json local
Last synced: about 2 months ago
JSON representation
A module for creating a local JSON-based database
- Host: GitHub
- URL: https://github.com/sergiogotuzzo/belin.db
- Owner: sergiogotuzzo
- Created: 2023-01-04T12:25:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-10-19T13:22:38.000Z (9 months ago)
- Last Synced: 2025-10-20T09:48:21.151Z (9 months ago)
- Topics: database, db, json, local
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/belin.db
- Size: 53.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# belin.db
A module for creating a local JSON-based database
## Installation
```
npm install belin.db
```
#### Example
```js
const { Database } = require("belin.db");
const db = new Database("./data.json", {
belowZero: true,
});
db.set("a.b.c", "value"); // { "a": { "b": { "c": "value" }}}
db.get("a"); // { "b": { "c": "value" }}
db.delete("a.b.c"); // { "a": { "b": {}}}
db.has("a.b.c"); // false
db.all(); // { "a": { "b": {}}}
db.clear(); // {}
```