code: function bfs(error, tree) {
      total--;
  
      if (error) {
        return event.emit("error", error);
      }
  
      tree.entries().forEach(function (entry, entryIndex) {
        if (!blobsOnly || entry.isFile() && !entries.has(entry)) {
          event.emit("entry", entry);
          entries.add(entry);
  
          // Node 0.12 doesn't support either [v for (v of entries)] nor
          // Array.from so we'll just maintain our own list.
          finalEntires.push(entry);
        }
  
        if (entry.isTree()) {
          total++;
          entry.getTree(bfs);
        }
      });
  
      if (total === 0) {
        event.emit("end", finalEntires);
      }
    }
docs: This looks like a DFS, but it is a BFS because of implicit queueing in the recursive call to `entry.getTree(bfs)`