conventional-changelog-action/node_modules/path-type
Conventional Changelog Action 9b8c94a880 chore(release): v3.13.0 [skip ci] 2022-05-27 14:13:36 +00:00
..
node_modules/pify chore(release): v3.13.0 [skip ci] 2022-05-27 14:13:36 +00:00
index.js chore(release): v3.13.0 [skip ci] 2022-05-27 14:13:36 +00:00
license chore(release): v3.13.0 [skip ci] 2022-05-27 14:13:36 +00:00
package.json chore(release): v3.13.0 [skip ci] 2022-05-27 14:13:36 +00:00
readme.md chore(release): v3.13.0 [skip ci] 2022-05-27 14:13:36 +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