1.0.5 • Published 10 months ago

teamarcades.db v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

teamarcades.db

Support: https://teamarcades.xyz/dc NPM: npmjs.com/package/teamarcades.db

const Database = require("teamarcades.db");
const db = new Database("./db.json");

db.set('serverStatus', { status: 'Online' })
/*
  "serverStatus": {
    "status": "Online"
  }
*/
db.add("money_K4itrun", 500)
/* 
  "money_K4itrun": 500
*/
db.push("serverSettings", { whitelist: "on", playerCount: "24" })
/*
  "serverSettings": [
      {
        "whitelist": "on",
        "playerCount": "24"
      }
    ]
*/
db.has("money_K4itrun") // true
db.has("money_iK4itrun") // false
db.get("money_K4itrun") // => 500
db.sub("money_K4itrun", 100)// => 400
db.fetch("serverStatus") // => { status: "Online" }
db.get("serverStatus") // => { status: "Online" }
db.delete("serverStatus") // => {}
db.clear() // {}
db.all()
/*
  {
    money_K4itrun: 500,
    serverSettings: [ { whitelist: 'on', playerCount: '24' } ]
  }
*/

Installation

If you have trouble with the installation, please feel free to visit our discord address.

  • npm i teamarcades.db

t e a m a r c a d e s . d b