install-nix-action/node_modules/path-type
Domen Kožar 70742d22d9
v6
2019-11-19 17:50:30 +01:00
..
index.js v6 2019-11-19 17:50:30 +01:00
license v6 2019-11-19 17:50:30 +01:00
package.json v6 2019-11-19 17:50:30 +01:00
readme.md v6 2019-11-19 17:50:30 +01:00

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