index.js
function exists(fileOrDir) {
  let stats;
  try {
    stats = statSync(fileOrDir);
    return stats.isFile() || stats.isDirectory();
  } catch (err) {
    return false;
  }
}
function exists(fileOrDir) {
  let stats;
  try {
    stats = statSync(fileOrDir);
    return stats.isFile() || stats.isDirectory();
  } catch (err) {
    return false;
  }
}
function exists ( fileOrDir ) { let stats ; try { stats = statSync ( fileOrDir ) ; return stats . isFile ( ) || stats . isDirectory ( ) ; } catch ( err ) { return false ; } }
Checks if a file or directory exists
@param     {String}  fileOrDir   name of file or directory
@returns   {Boolean}             if @fileOrDir exists and is readable file or directory
Checks if a file or directory exists