bozkurtdb
v1.0.3-fix
Published
A simple and useful database package.
Downloads
10
Readme
BOZKURTDB A simple and useful jsondb package.
Usage
const bozkurtdb = require("./index");
const db = bozkurtdb.connect();
bozkurtdb.settings({ parse: true })
db.set("hello", "world"); // world
db.get("hello"); // world
db.set("money", 100); // 100
db.add("money", 200); // 300
db.set("list", ["apple", "orange"]); // ['apple', 'orange'];
db.push("lemon"); // ['apple', 'orange', 'lemon']
db.unpush("orange"); // ['apple', 'lemon']
db.unpushLength("list", 0); // ['lemon']
db.set("user", "axe", true); // boolean (true / false)
db.set("user", "pickaxe", false); //boolean (true / false)
db.set("blacklisted", false); //boolean (true / false)
db.type("list"); // type (boolean / object / string / number)
db.type("user"); // type (boolean / object / string / number)
db.type("hello"); // type (boolean / object / string / number)
db.type("money"); // type (boolean / object / string / number)
db.type("blacklisted"); // type (boolean / object / string / number)
db.has("hello"); // boolean (true / false)
db.has("donkey"); // boolean (true / false)
db.delete("list"); // boolean (true / false)
db.deleteAll(); // boolean (true / false)