0.1.2 • Published 1 year ago

sad-db v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Example

const { SadDB } = require("sad-db")
const Database = new SadDB() //file is optional: new SadDB("filePath")

Database.sadSum("example", 5) //sum +5 in key "example", if not exists, the value of "example" will be 5
Database.sadSub("example", 5) //sub -5 in key "example", if not exists, the value of "example" will be -5
Database.sadAll() //will list all key values in the file .json
Database.sadGet("example") //will return key value from "example" in file .json
Database.sadDelete("example") //remove key "example" from the file .json

Other functions

const SadUtils = require("sad-db")

SadUtils.randomInt(0, 10) //will generate random number between 0-10
SadUtils.randomItem(["hello", "hi"]) //will return one random element from the give array
0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago