Merge pull request #12569 from thevtm/master

Added missing nconf.required(keys) and Provider.required(keys) methods.
This commit is contained in:
Paul van Brenk
2016-11-30 16:56:11 -08:00
committed by GitHub
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -57,6 +57,7 @@ nconf.init(opts);
p = nconf.overrides();
p = nconf.overrides(opts);
nconf.remove(str);
bool = nconf.required(strArr);
store = nconf.create(str, opts);
str = nconf.key(value, value);
@@ -118,6 +119,7 @@ p = p.defaults(opts);
p.init(opts);
p = p.overrides(opts);
p.remove(str);
bool = p.required(strArr);
store = p.create(str, opts);
// - - - - - - - - - - - - - - - - - - - - - - - - -
+2
View File
@@ -32,6 +32,7 @@ declare module "nconf" {
export function init(options?: IOptions): void;
export function overrides(options?: IOptions): Provider;
export function remove(name: string): void;
export function required(keys: string[]): boolean;
export function create(name: string, options: IOptions): IStore;
export function key(...values: any[]): string;
@@ -95,6 +96,7 @@ declare module "nconf" {
init(options?: IOptions): void;
overrides(options?: IOptions): Provider;
remove(name: string): void;
required(keys: string[]): boolean;
create(name: string, options: IOptions): IStore;
}