pure-flow-ai
TypeScript icon, indicating that this package has built-in type declarations

1.1.0Β β€’Β PublicΒ β€’Β Published

pure-flow-ai 🚫✨

CI status npm downloads npm license version

Efficient profanity filter for JavaScript/TypeScript applications with flexible configuration and simple API πŸ›‘οΈ

Table of Contents

  1. πŸ” Description
  2. ⚑ Features
  3. πŸ’» Installation
  4. πŸš€ Usage
  5. 🀝 Contributing
  6. πŸ“„ License

πŸ” 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-ai

Using yarn:

yarn install pure-flow-ai

Using pnpm:

pnpm install pure-flow-ai

Advanced 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:

  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 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.

Artemev Alexandr - Avatar
Artemev A. A.

πŸ“„ 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!

Package Sidebar

Install

npm i pure-flow-ai

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

13.2 kB

Total Files

7

Last publish

Collaborators

  • zilero