
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
bad-words-checker
Advanced tools
`bad-words-checker` is an npm package designed to detect and censor harmful words in text content. This package is especially useful for protecting children from exposure to violent, sexually explicit, and discriminatory language. It supports multiple lan
bad-words-checker
is an npm package designed to detect and censor harmful words in text content. This package is especially useful for protecting children from exposure to violent, sexually explicit, and discriminatory language. It supports multiple languages including English, Arabic, Chinese, French, German, Greek, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Thai, and Vietnamese.
The package supports the following languages: English Arabic Chinese French German Greek Hebrew Hindi Indonesian Italian Japanese Korean Portuguese Russian Spanish Thai Vietnamese
To install bad-words-checker
, run the following command:
npm install bad-words-checker
Usage
Below is an example of how to use bad-words-checker in your project:
import {
RegExpMatcher,
TextCensor,
englishDataset,
englishRecommendedTransformers,
} from 'obscenity';
import {
checkChineseText,
checkFrenchText,
checkGermanText,
checkGreekText,
checkHebrewText,
checkHindiText,
checkItalianText,
checkJapaneseText,
checkKoreanText,
checkPortugueseText,
checkRussianText,
checkSpanishText,
checkThaiText,
checkVietnameseText,
} from 'bad-words-checker';
// Initialize the English matcher
const englishMatcher = new RegExpMatcher({
...englishDataset.build(),
...englishRecommendedTransformers,
});
// Function to check text based on selected language
const checkText = (language, text) => {
let result;
switch (language) {
case 'hindi':
result = checkHindiText(text);
break;
case 'chinese':
result = checkChineseText(text);
break;
// Add cases for other languages as needed
// ...
default:
result = englishMatcher.replace(text, '*');
}
return result;
};
// Example usage
const textToCheck = "your text here";
const language = "hindi"; // Change to desired language
const result = checkText(language, textToCheck);
console.log(result);
FAQs
`bad-words-checker` is an npm package designed to detect and censor harmful words in text content. This package is especially useful for protecting children from exposure to violent, sexually explicit, and discriminatory language. It supports multiple lan
The npm package bad-words-checker receives a total of 4 weekly downloads. As such, bad-words-checker popularity was classified as not popular.
We found that bad-words-checker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.