We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6a7649 commit fafe5fdCopy full SHA for fafe5fd
1 file changed
implement-shell-tools/wc/wc.js
@@ -33,7 +33,18 @@ try {
33
34
results[filePath] = count;
35
}
36
- console.log(results);
+
37
+ if (filePaths.length > 1) {
38
+ const total = { lines: 0, words: 0, bytes: 0 };
39
+ for (const file of Object.values(results)) {
40
+ total.lines += file.lines;
41
+ total.words += file.words;
42
+ total.bytes += file.bytes;
43
+ }
44
+ results["total"] = total;
45
46
47
+ console.table(results);
48
} catch (err) {
49
console.error(err.message);
50
0 commit comments