Merge pull request #10297 from latotty/convict-validate-stict

[convict] Added options (strict) to convict Config.validate
This commit is contained in:
Yui
2016-07-27 10:15:45 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ conf.loadFile(['./configs/always.json', './configs/sometimes.json']);
// perform validation
conf.validate();
conf.validate({ strict: true });
var port: number = conf.default('port');

View File

@@ -41,7 +41,7 @@ declare module "convict" {
load(conf: Object): void;
loadFile(file: string): void;
loadFile(files: string[]): void;
validate(): void;
validate(options?: { strict?: boolean }): void;
/**
* Exports all the properties (that is the keys and their current values) as a {JSON} {Object}
* @returns {Object} A {JSON} compliant {Object}