See cosmiconfig.
Runtime configuration loader that supports YAML, JSON or JS.
This module supercharges rc to provide a smarter parser that can handle the following:
- YAML
- JSON
- JS (
module.exports = {...}orexports = {...})
$ npm install rc-loaderSee original rc documentation.