feat(tools): add get_random_words tool with Fisher-Yates shuffle

This commit is contained in:
2026-02-21 18:42:28 -06:00
parent a51842c48f
commit 03edd6e9d1
4 changed files with 54 additions and 0 deletions

5
services/randomWord.ts Normal file
View File

@@ -0,0 +1,5 @@
import fishersYatesShuffle from "@/helpers/shuffle"
export const getRandomWords = (words: string[], count: number) => {
return fishersYatesShuffle(words).slice(0, count)
}