1.0.9 • Published 4 years ago

@kishannareshpal/pairsjs v1.0.9

Weekly downloads
10
License
WTFPL
Repository
github
Last release
4 years ago

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
1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago