Constructor
new SeriesDescription(what, options)
Constructor
Parameters:
Name | Type | Description |
---|---|---|
what |
String | description of what is being described |
options |
DescribeOptions | options for how things are described |
Members
count :Number
The number of entries reviewed
Type:
- Number
max :any
The maximum value found
Type:
- any
min :any
The minimum value found;
Type:
- any
type :String
The type of thing being described
Type:
- String
what :String
What is being described
Type:
- String
Methods
check(value, expectedTypeOf) → {Boolean}
Validates a value is the type expected or throws an error if the type is not or throws false if the value is 'empty'
Parameters:
Name | Type | Description |
---|---|---|
value |
any | value to be checked |
expectedTypeOf |
String | the type of the value |
Throws:
-
if the value is the wrong type
- Type
- Error
Returns:
- true if found and the right type, false if empty
- Type
- Boolean
checkMinMax(value)
Checks for minimum and maximum values
Parameters:
Name | Type | Description |
---|---|---|
value |
any |
finalize()
Finalizes the review
reset()
Resets the Description to the initial state