• Stefan Cameron's avatar
    Added Null validator, validators now handle null/undefined, 100% coverage · 2ffe570e
    Stefan Cameron authored
    For properties/values that are expected to be `null`, the `valNull`
    validator will now handle it.
    
    Validators must now also handle `null` and `undefined` values according
    to the specified qualifier, returning success if the given value is
    one or the other, as long as the qualifier permits those values. For
    example, if the qualifier is EXPECTED and the value is `null`, then
    any validator would return success for that value. Given the same
    qualifier, but a value of `undefined`, all validators (except for
    the ANY type which is somewhat of an exception) would return an error
    because that value is not permitted given that qualifier.
    
    To help with `null` and `undefined` values, a new `nilPermitted()`
    method is provided by the `qualifiers` module.
    
    Finally, test coverage is back to 100%!!
    2ffe570e
This project is licensed under the MIT License. Learn more
LICENSE 1.05 KB