Skip to content

js-util/config-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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")

About

Quick and simple config loading, with sane defaults to get an application started

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published