1.0.2 • Published 8 years ago

simple-config-json v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

configJSON

Usage :

var config_json = require('simple-config-json'),
    option_for_config = {
    Directory : "./config/",
    debug : false
}

var config = new config_json("config1", option_for_config);

//Normal

console.log("Value for 'test_replace' : " + config.GetLine("test_replace", "deathart"));
console.log("Value for 'test' : " + config.GetLine("test"));
console.log("Value for 'username' : " + config.GetLine("username"));

//Block

console.log("Value for 'first_block' : " + config.GetBlock("first_block", "block_test"));
console.log("Value for 'deux_block' : " + config.GetBlock("deux_block", "block_test", "deathart"));

//Add line

config.SelLine({"test_set" : "settings add", "blabla_set" : "blabla_set is OK"});

//Delete line

config.Del("test_replace");