github-pages-deploy-action/node_modules/path-type
2020-03-31 08:57:48 -04:00
..
index.js Release 2020-03-21 17:13:25 -04:00
license Release 2020-03-21 17:13:25 -04:00
package.json 3.4.3 Dependencies 2020-03-31 08:57:48 -04:00
readme.md Release 2020-03-21 17:13:25 -04:00

path-type Build Status

Check if a path is a file, directory, or symlink

Install

$ npm install --save path-type

Usage

const pathType = require('path-type');

pathType.file('package.json').then(isFile => {
	console.log(isFile);
	//=> true
})

API

.file(path)

.dir(path)

.symlink(path)

Returns a Promise for a boolean of whether the path is the checked type.

.fileSync(path)

.dirSync(path)

.symlinkSync(path)

Returns a boolean of whether the path is the checked type.

License

MIT © Sindre Sorhus