Skip to content

Latest commit

 

History

History
70 lines (36 loc) · 758 Bytes

README.md

File metadata and controls

70 lines (36 loc) · 758 Bytes

confrc

Independent, simple, universe compatible, dotenv replacement config manager.

JSON way

config format

{
   'config':'value'
}

init

const confrc = require('confrc').base;

check if config exist

confrc.check('someConfig')

config read

let someConfig = confrc.get('someConfig');

more example

const confrc = require('confrc')).confrc;

if(!confrc.check('someConfig')){
    process.exit(5); 
};
let someConfig = confrc.get('someConfig');

Benefits

Imutable response

No more accidental config value change in the code.

Clean code

No more dotenv crash on linux

JSON format support

Forced type safety.