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