code: function isFile(p) {
      if (!fs.existsSync(p)) {
          return false;
      }
      try {
          let stats = fs.statSync(p);
          return stats.isFile();
      } catch (e) {
          return false;
      }
  }
docs: Checks if p is a file
  
  @param {string} p
  @returns {boolean}