rittenhop-ghost/versions/5.94.2/node_modules/is-valid-path
2024-09-23 19:05:38 -04:00
..
.editorconfig adding local files for running this....locally 2024-09-23 19:05:38 -04:00
.gitattributes adding local files for running this....locally 2024-09-23 19:05:38 -04:00
.jshintrc adding local files for running this....locally 2024-09-23 19:05:38 -04:00
.npmignore adding local files for running this....locally 2024-09-23 19:05:38 -04:00
.verb.md adding local files for running this....locally 2024-09-23 19:05:38 -04:00
index.js adding local files for running this....locally 2024-09-23 19:05:38 -04:00
LICENSE adding local files for running this....locally 2024-09-23 19:05:38 -04:00
package.json adding local files for running this....locally 2024-09-23 19:05:38 -04:00
README.md adding local files for running this....locally 2024-09-23 19:05:38 -04:00
test.js adding local files for running this....locally 2024-09-23 19:05:38 -04:00

is-valid-path NPM version

Returns true if a file path does not contain any invalid characters.

Install with npm

npm i is-valid-path --save

Usage

var isValid = require('is-valid-path');

/**
 * Valid
 */

isValid('abc.js');
//=> 'true'
isValid('abc/def/ghi.js');
//=> 'true'
isValid('foo.js');
//=> 'true'

/**
 * Invalid
 */

isValid();
//=> 'valse'
isValid(null);
//=> 'valse'
isValid('!foo.js');
//=> 'false'
isValid('*.js');
//=> 'false'
isValid('**/abc.js');
//=> 'false'
isValid('abc/*.js');
//=> 'false'
isValid('abc/(aaa|bbb).js');
//=> 'false'
isValid('abc/[a-z].js');
//=> 'false'
isValid('abc/{a,b}.js');
//=> 'false'
isValid('abc/?.js');
//=> 'false'
  • is-glob: Returns true if the given string looks like a glob pattern.
  • is-invalid-path: Returns true if a file path has invalid characters.
  • is-git-url: Regex to validate that a URL is a git url.
  • micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… more
  • parse-glob: Parse a glob pattern into an object of tokens.

Run tests

Install dev dependencies:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on May 06, 2015.