Commit fb41025

Andrew J.Swan <ajs.blackhole@gmail.com>
2024-02-13 11:47:41
favorite-word: More than 1 letter (#48)
1 parent 6601d49
Changed files (1)
src
all-badges
favorite-word
src/all-badges/favorite-word/favorite-word.ts
@@ -11,7 +11,7 @@ export default new (class implements BadgePresenter {
         const words = msg
           .split(/\s+/)
           .map((w) => w.trim())
-          .filter((w) => w.length > 0)
+          .filter((w) => w.length > 1)
           .map((w) => w.toLowerCase())
         for (const word of words) {
           counts[word] = (counts[word] || 0) + 1