raven.database
v1.1.9
Published
a simple JSON database module.
Downloads
17
Maintainers
Readme
Raven.database
Raven.database is an open source module. which means we can develop this project together with your help.
Examples
const ravendb = require("raven.database");
const db = new ravendb({
"dbName": "database", // You need to enter the file name of the database.
"dbPath": "ravendb", // You need to enter the file path it is name of the database.
"noBlankData": true,
"readable": true,
"language": "en" // You can make your language *en* or *tr*.
})
db.getAll(); // > All data is printed to the console.
// > Sets data in created database.
db.set("userItems", "sword");
// > Output: "sword"
// > Returns the value of the created data.
db.has("userItems");
// > Output: true
// > Prints the value of the generated data.
db.fetch("userItems");
// > Output: "sword"
// > Adds an element to your array-created data.
db.push("allItems", "pickaxe");
// > Output: ["pickaxe"]
// > Removes an element its to your array-created data.
db.unpush("allItems", "pickaxe");
// > Output: []
// > You add number to the created database.
db.add("userMoney", 500)
// > Output: 500
// > You subtract number to the created database.
db.substract("userMoney", 300);
// > Output: 200
// > Deletes your created data.
db.delete("userItems");
// > Output: true *or* false
// > Deletes all your created data.
db.deleteAll();
// > Output: true *or* false
Support Servers