Package Exports
- valid-file
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (valid-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
valid-file
Check if a file is a file.
Returns true if the path points to a valid file, otherwise, return false.
Install
$ npm install --save valid-fileUsage
const validFile = require('valid-file');Async
validFile('path/to/valid/file.txt', valid => {
console.log(valid);
});
//=> trueSync
validFile.sync('path/to/valid/file.txt');
//=> trueAPI
validFile(path, cb)
path
Type: string
The path to the file you are verifying.
cb
Type: function
Returns a single boolean indicating if the file is valid.
validFile.sync(path)
Returns: Boolean
The synchronous version of validFile(). No callback is supplied.
License
MIT © Michael Wuergler