1.0.1 • Published 3 years ago

filebased-db v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

filebased-db

this db is file based there is a folder called DB it will be your source, renaming it will make it unkowen there is a max of 250 files for this db, db.all() will return an array of the data. here is the test command

const db = require('filebased-db')
db.set('ok', 'bruh') // sets ok to bruh
db.set('19', 'bruh') // sets 19 to bruh
db.set('195', 'bruh5') // sets 195 to bruh5
const d = db.get('19') // defines it
console.log(d) // logs it
// db.deletef('19') // wont work if in vsc windows.
const data = db.all() // returns [{ name: '19', value: 'bruh', timeStamp: '1619549120251' }, { name: 'ok', value: 'bruh', timeStamp: '161954912025' }] an ARRAY
console.log(data)
console.log('there are ' + data.length + ' value(s) stored')

more features will be stored but here is an exapmple of the data being displayed

{ "name": "19", "value": "bruh", "timeStamp": "161954912025" }

all data is stored in .json if you encounter an error, contact me on discord at: NeonGamerBot_QK#1001

1.0.1

3 years ago

1.0.0

3 years ago