@js-util/config-loader

1.2.7 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @js-util/config-loader

Weekly Downloads

34

Version

1.2.7

License

MIT

Unpacked Size

9.1 kB

Total Files

6

Last publish

Collaborators

  • picocreator