3.2.0 • Published 2 years ago

json-db-easier v3.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Simple Database

Save your data with json database

⚠️Warning⚠️

Version 2 or lower will not work with version 3 or higher, to make it work, you need to copy your db.json and paste it in the new table directory, and delete the '"main":' thing, and delete 1 } at the end, and if u use encryption, you need decrypt it, then do the same thing Please install the latest package version, because there's so many bug fixes and some addition, thanks for choosing this package :)

Usage 📌

const Db = require('json-db-easier')
const db = new Db.Create("main", //table is "main" you can make it whatever you want
    {
    path: "./database",
    encryption: "key here" //this is optional, if you don't put this, it'll disabled, else, data encryption will be enabled, if you lost/forgor your key you are lost your data
    })
//set
db.set("name","value")
//get 
db.get("name").value
//delete 
db.delete("name")
//all 
db.all()
//has
db.has("name")
//push
db.push("name","value") // ["value"]
db.push("name","value2") // ["value", "value2"]
//ping
db.ping // return ping in ms

auto backup system

this db include auto backup system, to enable read this example:

db.autoBackup({
    every: 86400000, //1 day in ms
    path: "./backup"
    })

this will create backup file in ur backup directory

2.2.1

2 years ago

2.1.2

2 years ago

2.0.3

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.2.3

2 years ago

2.1.4

2 years ago

2.0.5

2 years ago

2.2.2

2 years ago

2.1.3

2 years ago

2.0.4

2 years ago

2.2.5

2 years ago

2.1.6

2 years ago

2.0.7

2 years ago

2.2.4

2 years ago

2.1.5

2 years ago

2.0.6

2 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.1.7

2 years ago

2.0.8

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

3.1.3

2 years ago

3.1.2

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.0.2

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.1.7

2 years ago

3.1.6

2 years ago

3.1.5

2 years ago

3.1.4

2 years ago

3.0.0

2 years ago

2.0.81

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago