Simple to use JSON file system meant for discord bots. It was designed and built for small and prototype applications.
Installation
npm install easy-discord-db
Create a database, insert and read an object
const DBClient = require('easy-json-db');
const db = new DBClient();
const insertResult = db.insert('users', 'Klein', {
admin: false,
});
if (!insertResult.ok) {
console.error(insertResult.err);
}
if (insertResult.ok) {
const getResult = db.get('users', 'Klein');
const userData = getResult.some ? getResult.val : {};
console.log(userData);
}
Generated using TypeDoc