New Version shazy.db@3.0.1
What Has Arrived?
- db.fetch,
- db.get,
- db.has,
Updated Settings Will Work More Accurately Now! Join our Support Server for Bug Reporting!
Support: Support Server
NPMJS: npmjs.com/package/shazy.db
const ShazYDatabase = require("shazy.db");
const db = new ShazYDatabase("./shazydb.json");
db.set('serverStatus', { status: 'Online' })
/*
"serverStatus": {
"status": "Online"
}
*/
db.add("shazy.money", 31)
/*
"shazy.money": 31
*/
db.push("serverSettings", { whitelist: "on", playerCount: "12" })
/*
"serverSettings": [
{
"whitelist": "on",
"playerCount": "12"
}
]
*/
db.has("shazy.money") // true
db.has("shazy.moneys") // false
db.get("shazy.money")
// => 500
db.substr("shazy.money", 400)
// => 100
db.fetch("serverStatus")
// => { status: "Online" }
db.get("serverStatus")
// => { status: "Online" }
db.delete("serverStatus")
// => {}
db.all()
/*
{
shazy.money: 500,
serverSettings: [ { whitelist: 'on', playerCount: '12' } ]
}
*/
db.clear()
// {}
If You Are Having Trouble With Installation Problems, Don't Forget To Visit Our Discord Address
npm i shazy.db