code: function filterFiles(files, recursive) {
      var fileOrDir = function fileOrDir(lstat) {
          return lstat.isFile() || lstat.isDirectory();
      };
      return files.filter(function (_ref) {
          var lstat = _ref.lstat;
  
          return recursive ? fileOrDir(lstat) : lstat.isFile();
      });
  }
docs: Filter lstat results, taking only files if recursive is false.
  @param {lstat[]} files An array with lstat results
  @param {boolean} [recursive = false] Whether recursive mode is on
  @returns {lstat[]} Filtered array.