1.0.3 • Published 3 years ago

useful.db v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

what is main language of useful.db?

the main language of useful.db is Typescript

installation

npm install useful.db

Typescript

import { Main } from 'useful.db'

const db = new Main("./example.json")

Javascript

const { Main } = require("useful.db")

const db = new Main("./example.json")

examples

db.set("example")  /* make a new data */ 
/* --> {"example", "example"} */

db.has("example")
/* --> return true or false */

 db.delete("example")
/* --> delete the data */

db.get("example")
/* --> return data */

db.push("key", ["data"]) /* make a new array data */
/* --> {"key":["data"]} */

db.getAll()
/* return you all data in file */

db.math(5, "+", 5)
/* --> 10 */
db.math(10, "/", 5)
/* --> 2 */
db.math(5, "*", 5)
/* --> 25 */
db.math(10, "-", "5")
/* --> 5 */

My bot discord server

https://discord.gg/qVukYFzkkH