Nomad Packaging Mechanism

    json-debby

    1.3.2 • Public • Published

    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!

    Install

    npm i json-debby

    DownloadsWeekly Downloads

    1

    Version

    1.3.2

    License

    ISC

    Unpacked Size

    6.18 kB

    Total Files

    5

    Last publish

    Collaborators

    • ghom