๐Ÿš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more โ†’
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-flow-ai

๐Ÿค– 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

1.1.0
latest
Version published
Weekly downloads
1
-75%
Maintainers
0
Weekly downloads
 
Created

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

๐Ÿ” 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:

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

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!

FAQs

Package last updated on 08 Mar 2025

Did you know?

Socket

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.

Install

Related posts