is-d
Version:
Check if a file is a directory
43 lines (23 loc) • 549 B
Markdown
is-d [](https://travis-ci.org/SamVerschueren/is-d)
Check if a file is a directory
# Install
```
npm install --save is-d
```
# Usage
```js
const isDirectory = require('is-d');
isDirectory.sync('index.js');
//=> false
isDirectory('foo').then(dir => {
//=> true
});
```
# API
## isDirectory(path)
## isDirectory.sync(path)
### path
Type: `string`
The path of the file.
# License
MIT © [Sam Verschueren](https://github.com/SamVerschueren)