Skip to content

๐Ÿ“‚ Easy to use json database. Used for Scratch For Discord.

Notifications You must be signed in to change notification settings

Androz2091/easy-json-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Easy Json Database

This database is used for the Scratch For Discord project.

Example

const Database = require("easy-json-database");
const db = new Database("./some-database.json", {
    snapshots: {
        enabled: true,
        interval: 24 * 60 * 60 * 1000,
        folder: './backups/'
    }
});

// Set data
db.set("Hello", "World");

// Get data
db.get("Hello"); // World

// Delete data
db.delete("Hello");

db.get("Hello"); // undefined
db.has("Hello"); // false

db.set("age", 10);
db.add("age", 1); // 11
db.subtract("age", 9); // 2

db.set("array", [ "apple" ]);
db.push("array", "orange"); // [ "apple", "orange" ]

// Clear data
db.clear();

// Get all the data
db.all();

About

๐Ÿ“‚ Easy to use json database. Used for Scratch For Discord.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published