Skip to content

Commit

Permalink
3+ words for m1l0
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfeinsilber committed May 18, 2024
1 parent 95970a6 commit d356a37
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/const/wordList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274928,10 +274928,12 @@
]

export const wordsByStartingLetter = WORD_LIST.reduce<{ [key: string]: string[] }>((acc, word) => {
const firstLetter = word[0]
if (!acc[firstLetter]) {
acc[firstLetter] = []
if (word.length >= 3) { // Only words 3+ letters long are valid
const firstLetter = word[0]
if (!acc[firstLetter]) {
acc[firstLetter] = []
}
acc[firstLetter].push(word)
}
acc[firstLetter].push(word)
return acc
}, {})
}, {})

0 comments on commit d356a37

Please sign in to comment.