Class: ConfigValidator

ConfigValidator(schema)

new ConfigValidator(schema)

Construct a validator of YAML files.
Parameters:
Name Type Description
schema string | Object The JSON schema file (as YAML) or object.
Source:

Methods

validate(inputConfig, defaultConfigopt) → {Object}

Validate the input config.
Parameters:
Name Type Attributes Description
inputConfig string | Object The input config file path (string) or parsed config (Object).
defaultConfig Object <optional>
The default config options.
Source:
Throws:
On validation errors
Returns:
The input config with defaults applied.
Type
Object