Export function to validate if a value is a boolean or not
- License:
- Source:
Example
import { isBoolean } from 'itee-validators' if( isBoolean( value ) ) { //... } else { //... }
Methods
-
<static> isBoolean(data)
-
Check if given data is a boolean
Parameters:
Name Type Description data
* The data to check against the booleaness Returns:
true if data is a boolean, false otherwise.- Type
- boolean
-
<static> isNotBoolean(data)
-
Check if given data is not a boolean
Parameters:
Name Type Description data
* The data to check against the booleaness Returns:
true if data is not a boolean, false otherwise.- Type
- boolean