Skip to content

JsonProvider allows you to manage a JSON file simply.

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt
Notifications You must be signed in to change notification settings

HurixStudio/JsonProvider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

JsonProvider

JsonProvider is a NodeJs library that allows the application developer and library to quickly manage their storage or configuration files.

Documentation

const Config = require('jsonprovider');
const config = new Config('./config.json');
config.load();
  • Save a value
config.set("Hello", "World!");
config.save();
  • Get a value
let result = config.get("Hello");

// Output: World!
  • Remove a value
config.remove("Hello");
config.save();
  • Get all value
var all = config.getAll();
  • Set value with array
config.setNested("Hello", "text", "World!");
config.setNested("Hello", "boolean", true);
config.setNested("Hello", "number", 50);
config.save();
/* Result:
{
    "Hello": {
        "text": "World!",
        "boolean": true,
        "number": 50
    }
}
 */
  • Remove value in array
config.removeNested("Hello", "text");
config.save();
/* Result:
{
    "Hello": {
        "boolean": true,
        "number": 50
    }
}
 */

Installation

Install with npm

npm install jsonprovider

About

JsonProvider allows you to manage a JSON file simply.

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt

Stars

Watchers

Forks