index.js
function isDir(p) {
    if (!fs.existsSync(p)) {
        return false;
    }
    try {
        let stats = fs.statSync(p);
        return stats.isDirectory();
    } catch (e) {
        return false;
    }
}
function isDir(p) {
    if (!fs.existsSync(p)) {
        return false;
    }
    try {
        let stats = fs.statSync(p);
        return stats.isDirectory();
    } catch (e) {
        return false;
    }
}
function isDir ( p ) { if ( ! fs . existsSync ( p ) ) { return false ; } try { let stats = fs . statSync ( p ) ; return stats . isDirectory ( ) ; } catch ( e ) { return false ; } }
Checks if p is a dir

@param {string} p
@returns {boolean}
Checks if p is a dir