README
valudate
Provides helpers to test for values rather than types.
Installation
With npm:
$ npm install valudate
With yarn:
$ yarn add valudate
The validation tests categories
- theValueIs: The true or false tests category
- theValueMust: The throw error tests category
theValueIs
Value validation tests that returns `true` if the value pass the test and `false` if it fails the test.
Test name | Description |
---|---|
aNonEmptyString | Test if a value is a non empty string. |
aNonEmptyObject | Test if a value is a non empty object. |
defined | Test if a value is defined. |
definedAndNotNull | Test if a value is defined and not null. |
notDefined | Test if a value is `undefined`. |
notDefinedOrNull | Test if a value is `undefined` or `null`. |
theValueMust
Value validation tests that throws when the value fails the test.
Test name | Description |
---|---|
beANonEmptyObject | |
beANonEmptyString | |
beDefined | Test if the value is defined |
See also
- The API documentation.
- The tests documentation.
© 2019 Jean Gregory Verret gregory.verret@gmail.com.