pure-flow-ai
Version:
๐ค 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
137 lines (98 loc) โข 4.34 kB
Markdown
<p align="center">
<a href="https://github.com/Zilero232/pure-flow-ai">
<img src="https://img.shields.io/github/actions/workflow/status/Zilero232/pure-flow-ai/integrate.yaml?label=CI&logo=GitHub" alt="CI status">
</a>
<a href="https://www.npmjs.com/package/pure-flow-ai">
<img src="https://img.shields.io/npm/dm/pure-flow-ai?logo=NPM" alt="npm downloads">
</a>
<a href="https://github.com/Zilero232/pure-flow-ai">
<img src="https://img.shields.io/npm/l/pure-flow-ai" alt="npm license">
</a>
<a href="https://github.com/Zilero232/pure-flow-ai">
<img src="https://img.shields.io/npm/v/pure-flow-ai?label=version" alt="version">
</a>
</p>
> **Efficient profanity filter** for JavaScript/TypeScript applications with flexible configuration and simple API ๐ก๏ธ
1. [๐ Description](
2. [โก Features](
3. [๐ป Installation](
4. [๐ Usage](
7. [๐ค Contributing](
8. [๐ License](
**`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.
- ๐ **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
```bash
npm install pure-flow-ai
```
```bash
yarn install pure-flow-ai
```
```bash
pnpm install pure-flow-ai
```
```typescript
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');
```
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.
1. Fork the repository.
2. Create a new branch (`git checkout -b feature/your-feature`).
3. Make your changes.
4. Commit your changes (`git commit -am 'Add new feature'`).
5. Push to the branch (`git push origin feature/your-feature`).
6. Open a pull request.
## ๐ Code of Conduct
Please follow our [Code of Conduct](CODE_OF_CONDUCT.md) 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](SECURITY.md) to report vulnerabilities safely and responsibly.
## ๐ฅ Team
These folks keep the project moving and are resources for help.
<table>
<tbody>
<tr>
<td align="center" valign="top" width="11%">
<a href="https://career.habr.com/zilero">
<img src="https://avatars.githubusercontent.com/u/68345676?s=400&u=eb7df22c29a8aca48def78ec54a7526601c9fd8f&v=4" width="100" height="100" alt="Artemev Alexandr - Avatar">
<br />
Artemev A. A.
</a>
</td>
</tr>
</tbody>
</table>
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
๐ก๏ธ Make your application safer with pure-flow-ai!
If you found this project useful, please consider giving it a โญ๏ธ on Github and sharing it with your friends!