Export function to validate if a value is a valid socket path
- License:
- Source:
Example
import { isValidSocketPath } from 'itee-validators'
if( isValidSocketPath( value ) ) {
//...
} else {
//...
}
Methods
-
<static> isInvalidSocketPath(data)
-
Check if given data is an invalid socket path
Parameters:
Name Type Description data* The data to check against the socket path type Returns:
true if data is an invalid socket path, false otherwise- Type
- boolean
-
<static> isValidSocketPath(data)
-
Check if given data is a valid socket path
Parameters:
Name Type Description data* The data to check against the socket path type Returns:
true if data is a valid socket path, false otherwise- Type
- boolean