useful.db
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i useful.db

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

18.6 kB

Total Files

7

Last publish

Collaborators

  • dagermohamed