lib/dir-exist.js
function dirExist(dirName) {
  return new Promise((resolve, reject) => {
    fs.stat(dirName, (err, stats) => {
      if (err === null && stats.isDirectory()) {
        resolve(dirName);
      } else {
        resolve(false);
      }
    });
  });
}
function dirExist(dirName) {
  return new Promise((resolve, reject) => {
    fs.stat(dirName, (err, stats) => {
      if (err === null && stats.isDirectory()) {
        resolve(dirName);
      } else {
        resolve(false);
      }
    });
  });
}
function dirExist ( dirName ) { return new Promise ( ( resolve , reject ) => { fs . stat ( dirName , ( err , stats ) => { if ( err === null && stats . isDirectory ( ) ) { resolve ( dirName ) ; } else { resolve ( false ) ; } } ) ; } ) ; }
Promisified "directory exist" check

@param {String} dirName
@return {Promise} resolves to dirName if exist, false otherwise
Promisified directory exist check