Count files properly
This commit is contained in:
parent
a852fa7998
commit
725fc81e2a
4
index.js
4
index.js
|
@ -125,7 +125,9 @@ const totalThings = Object.values(reports)
|
||||||
.flat();
|
.flat();
|
||||||
const kinds = new Set(totalThings.map((t) => t.type));
|
const kinds = new Set(totalThings.map((t) => t.type));
|
||||||
console.log(
|
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) {
|
for (const kind of kinds) {
|
||||||
const count = totalThings.filter((t) => t.type === kind).length;
|
const count = totalThings.filter((t) => t.type === kind).length;
|
||||||
|
|
Loading…
Reference in a new issue