From 725fc81e2a65fc4d2b8d181e01d2813845a1eeea Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 25 Nov 2022 20:10:26 -0300 Subject: [PATCH] Count files properly --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index b4fd7f8..f5c2faa 100644 --- a/index.js +++ b/index.js @@ -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;