index.js
function isDirectory(filePath) {
  if (!isExist(filePath)) return false;
  try {
    const stat = fs.statSync(filePath);
    return stat.isDirectory();
  } catch (e) {
    return false;
  }
}
function isDirectory(filePath) {
  if (!isExist(filePath)) return false;
  try {
    const stat = fs.statSync(filePath);
    return stat.isDirectory();
  } catch (e) {
    return false;
  }
}
function isDirectory ( filePath ) { if ( ! isExist ( filePath ) ) return false ; try { const stat = fs . statSync ( filePath ) ; return stat . isDirectory ( ) ; } catch ( e ) { return false ; } }
check path is directory
check path is directory