@kishannareshpal/pairsjs
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.9 • Public • Published

    PairsJS

    A NodeJS library for easy implementation and/or manipulation of key-value pairs. Can be used, for example, for configuration files.‌

    🌶 Getting Started is super easy!

    To install PairJS into your existing nodeJS app run this command:

    $ npm install @kishannareshpal/pairsjs

    Or by adding this line into the dependencies section of your package.json file

    dependencies {
        // add this line
        "@kishannareshpal/pairsjs": "^1.0.4"
    }
    
    // and then run this command.
    $ npm install

    🐌 Start using it right away!

    // import the module
    import PairsJS from '@kishannareshpal/pairsjs'
    
    /* 1st: Initialize it. */
    // – this will create a new file called `pairs.json`
    // in your root directory.
    let pairs = new PairsJS();
    
    
    /* 2nd: CRUD */
    // a) Add a new pair:
    pairs.add("username", "joebytes")
    pairs.add("age", 12)
    pairs.add("isVerified", true)
    
    /*
        ./pairs.json contents:
        
        {
            "username": "joebytes",
            "age": 12,
            "isVerified": true
        }
    */
    
    
    
    // b) Get a pair

    Install

    npm i @kishannareshpal/pairsjs

    DownloadsWeekly Downloads

    2

    Version

    1.0.9

    License

    WTFPL

    Unpacked Size

    19.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • kishannareshpal