Count files properly

This commit is contained in:
Cat /dev/Nulo 2022-11-25 20:10:26 -03:00
parent a852fa7998
commit 725fc81e2a

View file

@ -125,7 +125,9 @@ const totalThings = Object.values(reports)
.flat();
const kinds = new Set(totalThings.map((t) => t.type));
console.log(
`Finished with ${reports.length} files read, ${totalThings.length} things`
`Finished with ${Object.keys(reports).length} files read, ${
totalThings.length
} things`
);
for (const kind of kinds) {
const count = totalThings.filter((t) => t.type === kind).length;