Export function to validate if a value is an array of booleans or not
- License:
- Source:
Example
import { isArrayOfBoolean } from 'itee-validators' if( isArrayOfBoolean( value ) ) { //... } else { //... }
Methods
-
<static> isArrayOfBoolean(data)
-
Check if given data is not an empty array where all values are boolean
Parameters:
Name Type Description data
* The data to check against the array of booleans Returns:
true if data is not an empty array where all values are boolean, false otherwise- Type
- boolean
-
<static> isArrayOfFunction(data)
-
Check if given data is not an empty array where all values are functions
Parameters:
Name Type Description data
* The data to check against the array of functions Returns:
true if data is not an empty array where all values are functions, false otherwise- Type
- boolean
-
<static> isArrayOfNumber(data)
-
Check if given data is not an empty array where all values are numbers
Parameters:
Name Type Description data
* The data to check against the array of numbers Returns:
true if data is not an empty array where all values are numbers, false otherwise- Type
- boolean
-
<static> isNotArrayOfBoolean(data)
-
Check if given data is not an empty array where all values are not boolean
Parameters:
Name Type Description data
* The data to check against the array of booleans Returns:
true if data is not an empty array where all values are not boolean, false otherwise- Type
- boolean
-
<static> isNotArrayOfFunction(data)
-
Check if given data is not an empty array where all values are not functions
Parameters:
Name Type Description data
* The data to check against the array of functions Returns:
true if data is not an empty array where all values are not functions, false otherwise- Type
- boolean
-
<static> isNotArrayOfNumber(data)
-
Check if given data is not an empty array where all values are not numbers
Parameters:
Name Type Description data
* The data to check against the array of numbers Returns:
true if data is not an empty array where all values are not numbers, false otherwise- Type
- boolean