r3-v2/node_modules/path-type
Theunis J. Botha 5f5bbac56e initial comit 2020-02-27 15:24:35 +01:00
..
node_modules/pify initial comit 2020-02-27 15:24:35 +01:00
index.js initial comit 2020-02-27 15:24:35 +01:00
license initial comit 2020-02-27 15:24:35 +01:00
package.json initial comit 2020-02-27 15:24:35 +01:00
readme.md initial comit 2020-02-27 15:24:35 +01:00

readme.md

path-type Build Status

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

Install

$ npm install --save path-type

Usage

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

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

API

.file(path)

.dir(path)

Returns a promise that resolves to 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