JSON-based database for JavaScript
Go to file
2022-08-05 21:00:10 +02:00
.gitignore First commit 2022-07-16 14:22:26 -06:00
index.js Update 'index.js' 2022-08-05 21:00:10 +02:00
package.json First commit 2022-07-16 14:22:26 -06:00
README.md add readme 2022-07-16 14:30:44 -06:00
test.js First commit 2022-07-16 14:22:26 -06:00

jsondb

jsondb is a way to use JSON as a NoSQL database. It uses an ORM and is the only way to interact with the database.

Loading a database

All you need to do is to use loadDB. Here is an example:

let { loadDB } = require("jsondb");
let db = loadDB("db.json");

Setting values

You do it just like any JavaScript object. Here is an example:

db["bits"] = 64;
db.bits = 64; // this also works

Getting values

Again, it's just like any JS object. Here is an example:

let bits = db["bits"];
bits = db.bits; // that also works