projecte_ionic/node_modules/read-pkg/node_modules/path-type
2022-02-09 18:30:03 +01:00
..
index.js Conexio amb la api 2022-02-09 18:30:03 +01:00
license Conexio amb la api 2022-02-09 18:30:03 +01:00
package.json Conexio amb la api 2022-02-09 18:30:03 +01:00
readme.md Conexio amb la api 2022-02-09 18:30:03 +01: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)

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