1.3.2 • Published 5 years ago
json-debby v1.3.2
Debby - JSON Database
Easy-to-use JSON-based database for beginners
Install
included files
- Debby.js
- test.js
- test.json
- README.md
- package.json
npm install json-debby
Initialize
Add as many files as you want to your database by entering their path as a parameter of the constructor. They will be managed by Debby automatically, depending on what you request from your database.
const Debby = require("json-debby")
const debby = new Debby(
"./save.json", // mandatory path
"utf8" // optional encoding (default : utf8)
)
Properties
The path parameter represents a complete path.
The pathName parameter represents a piece of path.
- class Debby - content alias : data, source, object & json - async end() - static global_end() - static has( pathName ) - static find( pathName )
Examples
const debby = new Debby("./save.json")
function example(){
debby.json.fleurs = {}
debby.json.fleurs.rose = "🌹"
console.log(debby.json) /*=> {
"fleurs" : {
"rose" : "🌹"
}
}*/
debby.end() // save the changes if there were any.
}
example()
Thank for testing
I intend to improve this package as much as I could. Thank you for downloading!