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