README
Welcome to arks.db
arks.db module was written to save your data in json file.
Usage
const { Database } = require("arks.db");
const db = new Database();
// If you want you specify the file to save the data like; new Database("myDatas");
// To set your data to database;
db.set("example", "test"); // returns -> test
// To get your data from database;
db.get("example"); // returns -> test
// To delete your data from database;
db.delete("example"); // returns -> true
// To increase your data;
db.add("example", 2); // returns -> 2
// To decrase your data;
db.subtract("example", 1); // returns -> 1
// To learn database has the data;
db.has("example"); // returns -> true
// To push the data to database;
db.push("example", { test: "test" }); // returns -> { test: "test" }
// To pull the data from database;
db.pull("example", { test: "test" }); // returns -> []
// To get all data from database;
db.all();
// To delete all data in database;
db.clear();
Thanks
Thanks to Stark for his helpings.
Contact
Changelog
1.0.0
- Module published.