njconf

0.1.0 • Public • Published

njconf

Simple node.js JSON5 config module.

npm install njconf --save

API

njconf.load('config1.json5', 'config2.json5', ...) - This loads the given JSON5 config files and deep merges them in such a way that the configuration defined earlier takes priority over the the ones defined later.

Usage

const njconf = require('njconf');
 
njconf.load('config-specific.json5', 'config.default.json5')

Example

So lets's say that content of config-specific.json5 is:

{
  a: 'a',
  b: 'b'
}

and config.default.json5 is:

{
  a: '',
  c: 'c'
}

then the result will be:

{
  a: 'a',
  b: 'b',
  c: 'c'
}

Readme

Keywords

Package Sidebar

Install

npm i njconf

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • munawwar