| 2 | * Checks if input matches negative keyword patterns |
| 3 | */ |
| 4 | export function matchesNegativeKeyword(input: string): boolean { |
| 5 | const lowerInput = input.toLowerCase() |
| 6 | |
| 7 | const negativePattern = |
| 8 | /\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/ |
| 9 | |
| 10 | return negativePattern.test(lowerInput) |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * Checks if input matches keep going/continuation patterns |