How to use the parseSync function from iniparser

Find comprehensive JavaScript iniparser.parseSync code examples handpicked from public code repositorys.

108
109
110
111
112
113
114
115
116
117
118
119
120


if (!fs.existsSync(internals.configFile)) {
  console.log("ERROR - Couldn't open config file '" + internals.configFile + "' maybe use the -c <configfile> option");
  process.exit(1);
}
internals.config = ini.parseSync(internals.configFile);




if (internals.config["default"] === undefined) {
  console.log("ERROR - [default] section missing from", internals.configFile);
fork icon25
star icon44
watch icon6

+ 39 other calls in file

72
73
74
75
76
77
78
79
80
81
82
83
// read and process each of them
files.forEach(function(proxyfile) {
    log('Reading ' + cfgDir + '/' + proxyfile);


    // read the sites from the proxyfile
    var localSites = iniparser.parseSync(cfgDir + '/' + proxyfile);


    // store each site into the global sites list
    var siteNames = Object.keys(localSites);
    siteNames.forEach(function(siteName) {
fork icon2
star icon5
watch icon3

+ 37 other calls in file