yad.dbs
v0.0.2
Published
A JSON Database System
Downloads
1
Readme
yad.db package
Info
About
This Package Was Created With The Intention Of Making A Simply Way To Save Data!
Current Methods:
set("key", "value")
get("key")
has("key")
Created By Yad-Mations
Usage
Creating A Database
const ydb = require('yad.db')
const text = new ydb.database("Texts")
This Will Create A Database Called "Texts"
Putting Values Into The Database
const ydb = require('yad.db')
const text = new ydb.database("Texts")
text.set("Hello", true)
This Will Put Key "Hello" With Value "true"
{
"Hello": true
}
const ydb = require('yad.db')
const text = new ydb.database("Texts")
text.set("remember.this.Get-Money", "Yes")
This Will Put Keys "remember", "this" and "Get-Money" and the last one with set the value "Yes"
{
"Hello": true,
"remember": {
"this": {
"Get-Money": "Yes"
}
}
}
Getting Values From Databases
const ydb = require('yad.db')
const text = new ydb.database("Texts")
text.get("remember")
This will return a lineal estructure of it skiping the value that you input {this: {Get-Money: [Object] } }
PSD: values will get them as Objects
Cheching Values From Databases
const ydb = require('yad.db')
const text = new ydb.database("Texts")
text.has("bruh")
It Returns False Cause As We See In The Other Examples There's No "bruh" Key