
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
thai-bad-words
Advanced tools
A powerful TypeScript library for detecting inappropriate Thai words in text content. Perfect for content moderation, chat filters and other.
Choose your preferred package manager:
# Using npm
npm install @sit-sandbox/thai-bad-words
# Using yarn
yarn add @sit-sandbox/thai-bad-words
scanBadWords(input: Record<string,any>): void// Throws an error if bad words are found
scanBadWords("some text");
scanBadWords(["some text"]);
scanBadWords({"key":"some text"});
scanBadWords({
"level1": {
"key1": "some text",
"key2": {
"level2": [
{
"keyA": "some text",
"keyB": {
"level3": [
{
"keyX": "some text",
"keyY": {
"level4": [
{
"key1": "some text",
"key2": [
{
"keyZ": "some text",
"level5": {
"keyM": "some text",
"level6": [
{
"keyP": "some text",
"level7": [
"some text",
"some text",
"some text"
....
)
addBadWords(newBadWords: string[]): voidaddBadWords(["word1", "word2"]);
addIgnoreList(newIgnoreWords: string[]): voidaddIgnoreList(["false_positive1", "false_positive2"]);
addPrefixes(newPrefixes: string[]): voidaddPrefixes(["prefix1", "prefix2"]);
removeBadWords(wordsToRemove: string[]): voidremoveBadWords(["word1"]);
getBadWords(): string[]const badWords = getBadWords();
import { scanBadWords, addBadWords, addIgnoreList } from "@sit-sandbox/thai-bad-words";
// Add words to ignore
addIgnoreList(["หีบ", "สัสดี"]);
// Add new bad words
addBadWords(["โง่", "บ้า"]);
// Check text
try {
scanBadWords("some text to check");
} catch (error) {
console.log("❌ Bad word detected:", error.message);
}
Common prefixes used for word combinations:
["กู", "มึง", "ไอ้", "อี", "ไอ", "ผม", "คุณ", "กระผม", "เธอ", "พ่อ", "แม่", "นาย"];
Words that should be skipped during detection:
["หีบ", "สัสดี", "หน้าหีบ", "ตด"];
Base inappropriate words (shortened for README):
["ควย", "เหี้ย", "หี", "สัส", "เชี่ย" /* ... and more ... */];
Contributions are welcome! Feel free to:
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or need support, please:
FAQs
A package to detect bad words in Thai language.
We found that thai-bad-words demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.