pure-flow-ai
v1.1.0
Published
π€ Smart text analysis package for detecting positive and negative words with AI support. Features customizable word lists, multiple languages, and AI-powered sentiment analysis. Perfect for content moderation, sentiment analysis, and text filtering in an
Maintainers
Keywords
Readme
pure-flow-ai π«β¨
Efficient profanity filter for JavaScript/TypeScript applications with flexible configuration and simple API π‘οΈ
Table of Contents
π Description
pure-flow-ai is a powerful and flexible profanity filter for JavaScript and TypeScript applications. It provides a simple yet comprehensive API for detecting, masking, and cleaning text from inappropriate language. Perfect for chat applications, comment systems, or any text-processing functionality requiring content moderation.
β‘ Features
- π Smart Detection: Efficiently identifies profane words in text
- π Flexible Masking: Customizable placeholder characters for censoring
- π§Ή Text Cleaning: Complete removal of inappropriate content
- π Customizable Lists: Add your own words to block or allow
- πͺ TypeScript Support: Full type definitions included
- π Case Insensitive: Works regardless of letter casing
- π― Zero Dependencies: Lightweight and efficient
- π Unicode Support: Works with special characters and different alphabets
π» Installation
Using npm:
npm install pure-flow-aiUsing yarn:
yarn install pure-flow-aiUsing pnpm:
pnpm install pure-flow-aiAdvanced Example
import BadWordFilter from 'pure-flow-ai';
// Initialize with default options.
const { hasProfaneWords, maskProfanity, cleanString } = BadWordFilter({
additionalBlockWords: ['bad', 'word,'],
excludedWords: ['trash'],
placeholder: '*',
overrideBlockWords: true
});
// Check if text contains profanity.
const hasBadWords = hasProfaneWords('your text here');
// Mask profane words with asterisks
const masked = maskProfanity('your text here');
// Clean text by removing profane words.
const clean = cleanString('your text here');π€ Contributing
We'd love for you to contribute to pure-flow-ai! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help is always appreciated.
How to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
π Code of Conduct
Please follow our Code of Conduct when participating in this project to ensure a welcoming and productive atmosphere.
π Security Policy
Security is our priority. If you encounter any issues, please read our full Security Policy to report vulnerabilities safely and responsibly.
π₯ Team
These folks keep the project moving and are resources for help.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π‘οΈ Make your application safer with pure-flow-ai!
Support
If you found this project useful, please consider giving it a βοΈ on Github and sharing it with your friends!
