-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ New post-`[email protected]` code: | |
const convict = require('convict') | ||
const convict_format_with_validator = require('convict-format-with-validator') | ||
const convict_format_with_moment = require('convict-format-with-moment') | ||
const json5 = require('json5') | ||
const JSON5 = require('json5') | ||
|
||
// Use this only if you use the "email", "ipaddress" or "url" format | ||
convict.addFormats(convict_format_with_validator) | ||
|
@@ -32,7 +32,7 @@ convict.addFormats(convict_format_with_moment) | |
|
||
// Use this only if you have a .json configuration file in JSON5 format | ||
// (i.e. with comments, etc.). | ||
convict.addParser({extension: 'json', parse: JSON.parse}) | ||
convict.addParser({extension: 'json', parse: JSON5.parse}) | ||
|
||
const config = convict(config_schema) | ||
``` |