Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-d

samverschueren42.1kMIT1.0.0

Check if a file is a directory

is-directory, is-dir, dir, directory, check, folder

readme

is-d Build Status

Check if a file is a directory

Install

$ npm install --save is-d

Usage

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