belin.db
v1.1.0
Published
A module for creating a local JSON-based database
Downloads
78
Readme
belin.db
A module for creating a local JSON-based database
Installation
npm install belin.db
Example
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(); // {}