Skip to content

Savaksp/easy_jdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm npm

Easy JDB

Easy json DB. (nodejs)

Install

npm install easy_jdb

Usage

const { Database } = require("easy_jdb");

// Create db object
const db = new Database("users.db", true); // name, autoSave
// Print if key exists
console.log(db.exists("1010")); // key
// Set value to 0 if not exists
db.setIfNotExists("1010", 0); // key, valueToSet
// Print value that we got
console.log(db.getValue("1010")); // key
// Set new value to 50
db.setValue("1010", 50); // key, valueToSet
// Print value that we got
console.log(db.getValue("1010"));
// Remove value
db.remove("1010");
// Print value that we got
console.log(db.getValue("1010"));
// Save db if autoSave is false
db.save();

About

Easy json DB. (nodejs)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published