// Name: Brainrot Generator
// Description: Generate chaotic meme-style brainrot text for any topic and copy it to the clipboard.
// Author: freddyhacks1x1666
// GitHub: freddyhacks1x1666
import "@johnlindquist/kit"
function rand<T>(arr: T[]): T {
return arr[Math.floor(Math.random() * arr.length)]
}
function spongebobCase(s: string): string {
return s
.split("")
.map((c, i) => (/[a-z]/i.test(c) ? (i % 2 ? c.toLowerCase() : c.toUpperCase()) : c))
.join("")
}
function fallbackBrainrot(topic: string): string {
const nouns = [