Initial commit
[yaffs-website] / node_modules / path-type / readme.md
1 # path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type)
2
3 > Check if a path is a file, directory, or symlink
4
5
6 ## Install
7
8 ```
9 $ npm install --save path-type
10 ```
11
12
13 ## Usage
14
15 ```js
16 var pathType = require('path-type');
17
18 pathType.file('package.json').then(function (isFile) {
19         console.log(isFile);
20         //=> true
21 })
22 ```
23
24
25 ## API
26
27 ### .file(path)
28 ### .dir(path)
29 ### .symlink(path)
30
31 Returns a promise that resolves to a boolean of whether the path is the checked type.
32
33 ### .fileSync(path)
34 ### .dirSync(path)
35 ### .symlinkSync(path)
36
37 Returns a boolean of whether the path is the checked type.
38
39
40 ## License
41
42 MIT © [Sindre Sorhus](http://sindresorhus.com)