gr

get-rc

easily load runtime configuration files

Showing:

Popularity

Downloads/wk

1

GitHub Stars

2

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.7KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

get-rc

easily load runtime configuration files

Build Status

screen shot 2016-08-03 at 12 32 57

Installation

npm i get-rc

Usage

setConfigName(name)

  • name {String}

Sets the name of the config file we're looking for. You only have to call this once.

setConfigName('.foorc')  

getConfig([path])

  • path {String} - defaults to process.cwd()

Synchronously loads config files specified in setConfigName in each level of the path. Configs are merged together with the most local to path taking precedence. Also checks the user's HOME directory. An object will always be returned, even if no config is found or there are problems parsing one or more of them.

const config = getConfig('/foo/bar/baz');

kickstarted by npm-boom

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial