global.db
v1.0.1
Published
An easy to use local json database.
Maintainers
Readme
GlobalDB
Global Database is an easy to use local database. No setup needed, data is stored in your local storage in a json file. GlobalDB is designed similar to NoSQL database.
Features
- NO setup needed.
- Designed similar to NoSQL database.
- Easy to use for beginners.
- Stored locally.
How to use
You don't need to setup the database, no key or code needed. ALL data are stored in your local storage.
const GlobalDB = require("global.db")
const db = new GlobalDB({ path: "./database/userID.json" });
// Set a value to the specified key. Result : { economy: { money: 10000, bank: 5000 } }
db.set("economy", { money: 10000, bank: 5000 });
// This will check if economy exists or not. Result : true
db.has("economy");
// Get data from the economy key. Result : { money: 10000, bank: 5000 }
db.get("economy");
// Delete a key from the database. Result: {}
db.delete("economy")Installation
- Install node.js and npm.
- Go to your project directory.
- Run
npm install global.db
Changelogs
v1.0.0
Added all main features
