Package Exports
- global.db
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (global.db) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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