https://github.com/3p3r/opshun
type safe "rc"
https://github.com/3p3r/opshun
config defaults rc unix
Last synced: about 1 year ago
JSON representation
type safe "rc"
- Host: GitHub
- URL: https://github.com/3p3r/opshun
- Owner: 3p3r
- License: mit
- Created: 2020-05-26T18:53:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-05T13:31:49.000Z (almost 5 years ago)
- Last Synced: 2025-03-15T11:17:35.858Z (over 1 year ago)
- Topics: config, defaults, rc, unix
- Language: JavaScript
- Size: 124 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# opshun
type-safe version of the [rc package](https://www.npmjs.com/package/rc).
## why
this is a drop-in replacement for the rc package that accomplishes:
1. enabling type safety (original rc reads everything as strings)
1. logging flat version of the parsed config for debugging
1. fixing VSCode's intellisense references to the package
## usage
in your project:
```bash
npm install --save opshun
```
in your code:
```JS
const rc = require('opshun);
const conf = rc(appname, {
//defaults go here.
port: 2468,
//defaults which are objects will be merged, not replaced
views: {
engine: 'jade'
}
});
```