1.0.8 • Published 5 years ago
jsonconfighelper v1.0.8
JSONConfigHelper
Support Discord | View the API Documentation
A simple helper package to make it easier to read and write from your JSON configuration file.
Installation
npm i jsonconfighelper
OR
yarn add jsonconfighelper
Usage
const JCH = require('jsonconfighelper');
const Config = new JCH('./config.json');
// Get value
let someValue = Config.getValue('myValue');
// OR get a nested value using dot (.) notation
let someNestedValue = Config.getValue('value.nestedValue');
// Set value
Config.setValue('myValue', 'This is cool');
// OR set a nested value
Config.setValue('value.nestedValue', 'Nested, very nice.');
// Need lower level access to your configuration file?
let rawConfig = Config.getRaw(); // Returns raw JSON.