is-directory-promise
Version:
Checks if a path is directory and returns promise
17 lines (13 loc) • 431 B
Markdown
Checks if a path is a directory and returns promise
```javascript
const isDirectoryP = require('is-directory-promise');
isDirectoryP('\.').then(result => console.log(result)); //true
isDirectoryP('non-exist-dir').then(result => console.log(result)); //false
isDirectoryP(14).then().catch(err => console.error(err)); //the path argument must be a string
```
```javascript
npm test
```