File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -333,21 +333,21 @@ config.loadFile('config.toml');
333333If no supported extension is detected, ` loadFile ` will fallback to using the
334334default json parser.
335335
336- #### Allow comment in json file
336+ #### Allow comments in JSON files
337337
338- If you want allow comment in your json file, use [ json5 ] ( https://www.npmjs.com/package/json5 ) .
338+ If you want to allow comments in your JSON file, use [ JSON5 ] ( https://www.npmjs.com/package/json5 ) .
339339
340340``` javascript
341- convict .addParser ({ extension: ' json' , parse: require (' json5' ).parse });
341+ convict .addParser ({extension: ' json' , parse: require (' json5' ).parse });
342342```
343343
344+
344345## API
345346
346347### var config = convict(schema)
347348
348349` convict() ` takes a schema object or a path to a schema JSON file and returns a
349350convict configuration object.
350- JSON files are loaded using ` JSON5 ` , so they can contain comments.
351351
352352The configuration object has an API for getting and setting values, described
353353below.
@@ -483,7 +483,6 @@ config.load({
483483### config.loadFile(file or fileArray)
484484
485485Loads and merges one or multiple JSON configuration files into ` config ` .
486- JSON files are loaded using ` JSON5 ` , so they can contain comments.
487486E.g.:
488487``` javascript
489488config .loadFile (' ./config/' + conf .get (' env' ) + ' .json' );
You can’t perform that action at this time.
0 commit comments