@js-util/config-loader
v1.2.7
Published
Quick and simple config loading, with sane defaults to get an application started
Downloads
132
Readme
config-loader
Quick and simple config loading, with sane defaults to get an application started
npm install
npm install --save @js-util/config-loader
Example usage
const ConfigLoader = ("@js-util/config-loader")
//
// Load the various config files (if found),
// along with the various default value fallbacks
//
const config = new ConfigLoader({
fileList: ["./config.json", "./config.hjson"],
default: require("./config.default.js"),
configDirList: ["./config/"],
});
//
// Fetch some config values
//
config.fetchValue("hello.world")