How to use ini

Comprehensive ini code examples:

How to use ini.stringify:

17
18
19
20
21
22
23
24
25
26
		node.error(e.message, msg);
	}
} else if (typeof value === 'object') {
	if (!Buffer.isBuffer(value)) {
		try {
			value = ini.stringify(value);
			RED.util.setMessageProperty(msg, node.property, value);
			node.send(msg);
		} catch (e) {
			node.error(RED._('parser-ini.errors.dropped-error'));

How to use ini.parse:

91
92
93
94
95
96
97
98
99
100
      " Remove all rights from everyone else but owner"
  );
}

var content = fs.readFileSync(filename, "utf-8");
var config = ini.parse(content);

if (!config.maxctrl) {
  throw Error("Error: " + filename + " does not have a [maxctrl] section");
}