welsonjs/lib/config.js

17 lines
428 B
JavaScript
Raw Normal View History

2020-11-05 03:04:50 +00:00
////////////////////////////////////////////////////////////////////////
// Config API
////////////////////////////////////////////////////////////////////////
var XML = require("lib/xml");
var configObject;
var readConfig = function(path) {
if (typeof(configObject) === "undefined") {
configObject = XML.loadXMLFile("config.xml");
}
return configObject.select(path);
};
exports.readConfig = readConfig;