Check if a string is a valid filename
$ npm install valid-filename
import isValidFilename from 'valid-filename';
isValidFilename('foo/bar');
//=> false
isValidFilename('foo-bar');
//=> true
Returns a boolean
of whether input
is a valid filename.
Type: string
The string to check.
- filenamify - Convert a string to a valid safe filename