0.0.9 • Published 5 years ago
multipass-config-validator-alpha v0.0.9
Config validator
Methods
validateAndCreateDefault(config, schema, location, options);
validate(config, schema, options)
Define
{
"element": "string"
}
OR
{
"element": {
"type": "string",
"required": false,
"values": ["example1", "example2"],
"default": "example1"
}
}
Options
logger - function or null. Default: console.err(). strictMode - return error or log error. Default: true.
Types
- number
- boolean
- string
- symbol
- object
- bigint
- url
- array
- integer
Test
npm run test