$ gnpm install valid-filename
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.
Copyright 2013 - present © cnpmjs.org | Home |