Update README.md
Add basic documentation explaining the `nconf.required` method
This commit is contained in:
parent
4a59c9b577
commit
de551d42ec
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
@ -149,6 +149,18 @@ Removes the store with the specified `name.` The configuration stored at that le
|
|||
|
||||
``` js
|
||||
nconf.remove('file');
|
||||
```y
|
||||
|
||||
### nconf.required(keys)
|
||||
Declares a set of string keys to be mandatory, and throw an error if any are missing.
|
||||
|
||||
```js
|
||||
nconf.defaults({
|
||||
keya: 'a',
|
||||
});
|
||||
|
||||
nconf.required(['keya', 'keyb']);
|
||||
// Error: Missing required keys: keyb
|
||||
```
|
||||
|
||||
## Storage Engines
|
||||
|
|
Loading…
Reference in a new issue