Export function to validate if a value is a file path
- License:
- Source:
Example
import { isFilePath } from 'itee-validators'
if( isFilePath( value ) ) {
//...
} else {
//...
}
Requires
Methods
-
<static> isFilePath(path)
-
Check if given path is a file path
Parameters:
Name Type Description pathstring | Buffer | URL The data to check against the file path type Returns:
true if path is a file path, false otherwise- Type
- boolean
-
<static> isNotFilePath(path)
-
Check if given path is not a file path
Parameters:
Name Type Description pathstring | Buffer | URL The data to check against the file path type Returns:
true if path is not a file path, false otherwise- Type
- boolean