lib/file-exist.js
function fileExist(fileName) {
  return new Promise((resolve, reject) => {
    fs.stat(fileName, (err, stats) => {
      if (err === null && stats.isFile()) {
        resolve(fileName);
      } else {
        resolve(false);
      }
    });
  });
}
function fileExist(fileName) {
  return new Promise((resolve, reject) => {
    fs.stat(fileName, (err, stats) => {
      if (err === null && stats.isFile()) {
        resolve(fileName);
      } else {
        resolve(false);
      }
    });
  });
}
function fileExist ( fileName ) { return new Promise ( ( resolve , reject ) => { fs . stat ( fileName , ( err , stats ) => { if ( err === null && stats . isFile ( ) ) { resolve ( fileName ) ; } else { resolve ( false ) ; } } ) ; } ) ; }
Promisified "file exist" check

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