conventional-changelog-action/node_modules/path-type
Conventional Changelog Action 1af857c6a9 chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
..
node_modules/pify chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
index.js chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
license chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
package.json chore(release): v3.9.5 2021-10-05 21:52:13 +00:00
readme.md chore(release): v3.9.5 2021-10-05 21:52:13 +00:00

readme.md

path-type Build Status

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

Install

$ npm install path-type

Usage

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

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

API

.file(path)

.dir(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