bozkurtdb

1.0.3-fix • Public • Published

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)

Package Sidebar

Install

npm i bozkurtdb

Weekly Downloads

8

Version

1.0.3-fix

License

MIT

Unpacked Size

10 kB

Total Files

4

Last publish

Collaborators

  • uwuv3
  • fhyrox