Skip to content

bhlist/bhbl.db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

bhbl.db

Join our discord
Support: https://bhlist.co.in/dc
NPM: npmjs.com/package/bhbl.db

NPM version NPM downloads

npm installnfo

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

db.set('serverStatus', { status: 'Online' })
/*
"serverStatus": {
  "status": "Online"
}
*/
db.add("money_bhbl", 500)
/* 
  "money_bhbl": 500
*/
db.push("serverSettings", { whitelist: "on", playerCount: "24" })
/*
"serverSettings": [
    {
      "whitelist": "on",
      "playerCount": "24"
    }
  ]
*/
db.has("money_bhbl") // true
db.has("money_ibhbl") // false

db.get("money_bhbl")
// => 500

db.sub("money_bhbl", 100)
// => 400

db.fetch("serverStatus")
// => { status: "Online" }

db.get("serverStatus")
// => { status: "Online" }

db.delete("serverStatus")
// => {}

db.all()
/*
{
  money_bhbl: 500,
  serverSettings: [ { whitelist: 'on', playerCount: '24' } ]
}
*/

db.clear()
// {}

Installation

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

  • npm i bhbl.db

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published