Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@coffeeandfun/google-profanity-words
Advanced tools
Full list of bad words and top swear words banned by Google.
Full list of bad words and top swear words banned by Google. The list is updated monthly. Pull requests are welcome!
The @coffeeandfun/google-profanity-words
is a Node.js module created by Robert James Gabriel from Coffee & Fun LLC. It is designed to help you identify and manage profanity words in a given text. The module provides functions to retrieve a list of all known profanity words, check if a specific word is considered profane, and handle empty strings appropriately.
You can install the @coffeeandfun/google-profanity-words
module using npm:
npm install @coffeeandfun/google-profanity-words
To use the @coffeeandfun/google-profanity-words
, first, import the module and create an instance:
import { ProfanityEngine } from '@coffeeandfun/google-profanity-words';
// Pass the 'language' parameter to specify the language (optional).
// Defaults to 'en' if no valid language code is provided.
const profanity = new ProfanityEngine({ language: 'es' });
The language parameter is optional and can be used to specify the language for the profanity list. It defaults to 'en' if no valid language code is provided. If the specified language file is not found, it will fall back to the 'en' language file and display a console warning.
all()
Retrieves all the profanity words as an array.
const allWords = profanity.all();
search(word)
Checks if a given word is considered profane.
const searchWord = profanity.search('shit');
// Returns true if the word is profane, otherwise false.
The search
function will return false
for any empty string.
const searchWord = profanity.search('');
// Returns false for an empty string.
The @coffeeandfun/google-profanity-words
comes with a test suite using the Jest framework. To run the tests, use the following command:
npm test
Contributions to this module are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request on the GitHub repository.
This project is licensed under the MIT License.
Special thanks to Robert James Gabriel and Coffee & Fun LLC for creating and maintaining this module, as well as the Jest team for the testing framework. Your efforts make this module more reliable and robust.
FAQs
Full list of bad words and top swear words banned by Google.
The npm package @coffeeandfun/google-profanity-words receives a total of 783 weekly downloads. As such, @coffeeandfun/google-profanity-words popularity was classified as not popular.
We found that @coffeeandfun/google-profanity-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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.