sanikava-db.json

sanikava-db.json made for all device user its like quick.db but in json because quick.db will not work for all

Usage no npm install needed!

<script type="module">
  import sanikavaDbJson from 'https://cdn.skypack.dev/sanikava-db.json';
</script>

README

sanikava-db.json made for all device user its like quick.db but in json because quick.db will not work for all

How to use?

const db = require("sanikava-db.json")

db.File("file.json") //[Main line it will set your file to save without this you can't run]
//-> Define where you want to save data
db.set("player.name","Sanikava") //[this is setting variable in json)]
//-> It's for adding data like tables
db.add("player.points",1) //[this is adding thing to variable but remember you have to use outside of quotation marks (") or (`) ]
//-> It's for points
db.get("player.name") //[with this you can get thing from variable in json our how many points user have.]
//-> output (Sanikava)

db.push("player.items","sword") //[you can add new things to array by this you can add more data in one user without removing other data]
//-> It's for array or you can add 2 or more in one
db.del("player.items") //[delete variable from json]
//-> It will remove your value

db.subtract("player.points",1) //[subtract value or points]
//-> It will subtract points of user