Added missing nconf.required(keys) and Provider.required(keys) methods.

This commit is contained in:
TheVTM
2016-11-08 17:00:56 -02:00
parent 3abf7a7bd4
commit 199e45bc8c
2 changed files with 4 additions and 0 deletions

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
nconf/nconf.d.ts vendored
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;
}