1.0.0-beta • Published 3 years ago

vexdatabase v1.0.0-beta

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

VEX Projects • vexdatabase

  • A simple object-oriented database package made with vweevers's level package.

To use it, you need to install the level and deasync modules.

DocumentationDeveloper Blog
https://sherlockyigit.github.io/vexdatabase-docs/vexDatabase.htmlSoon..

Update note (1.0.0-beta):

  • Bugs have been fixed.

Installation steps

npm install vexdatabase --save

Functions

all()

  • You fetch all the data saved in the database.
let db = require("vexdatabase");
db = new db();

console.log(db.all());
/*
  { data..  }
*/

set(key, value)

  • Sets data in created database.
let db = require("vexdatabase");
db = new db();

console.log(db.set("a.b.c", "Test!")) // Test!

get(key)

  • You check if there is data in the database created.
let db = require("vexdatabase");
db = new db();

console.log(db.get("a.b.c")) // Test!

has(key)

  • You check if there is data in the database created.
let db = require("vexdatabase");
db = new db();

console.log(db.has("a.b.c")) // If data is deleted, the output is true, if it is not deleted, false 

add(key, value)

let db = require("vexdatabase");
db = new db();

console.log(db.add("a.b.c", 1)) // 1

substract(key, value)

  • You add subtract to the created database.
let db = require("vexdatabase");
db = new db();

console.log(db.substract("a.b.c", 1)) // 0

push(key, value)

  • You push data to the array in the database created with the key.
let db = require("vexdatabase");
db = new db();

console.log(db.push("a.b.c", "Test!")) // [ "Test!" ]

unpush(key, value)

  • You unpush data to the array in the database created with the key.
let db = require("vexdatabase");
db = new db();

console.log(db.unpush("a.b.c", "Test!")) // []

delete(key)

  • You delete data from the created database.
let db = require("vexdatabase");
db = new db();

console.log(db.delete("a"));
/*
  If data is deleted, the output is true, if it is not deleted, false 
*/

deleteAll(key)

  • You delete all the data in the database.
let db = require("vexdatabase");
db = new db();

console.log(db.deleteAll());
/*
  If data is deleted, the output is true, if it is not deleted, false 
*/
1.0.0-beta

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago