get-rc

1.0.0 • Public • Published

get-rc

easily load runtime configuration files

Build Status

screen shot 2016-08-03 at 12 32 57

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

Package Sidebar

Install

npm i get-rc

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • reergymerej