Sha256: 4483c606d119af84f36bd6a0173a07840cee66eb59b0348226a197acecf83f12
Contents?: true
Size: 728 Bytes
Versions: 35
Compression:
Stored size: 728 Bytes
Contents
# path-type [](https://travis-ci.org/sindresorhus/path-type) > Check if a path is a file, directory, or symlink ## Install ``` $ npm install --save path-type ``` ## Usage ```js var pathType = require('path-type'); pathType.file('package.json').then(function (isFile) { console.log(isFile); //=> true }) ``` ## API ### .file(path) ### .dir(path) ### .symlink(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](http://sindresorhus.com)
Version data entries
35 entries across 34 versions & 15 rubygems