🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

profanity-check

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

profanity-check

This is a multi-language profanity check for validating text is clear and doesn't contain any profane words

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Profanity Check

This is a multi-language profanity check for validating text is clear and doesn't contain any profane words

Supported languages

  • Arabic
  • Chinese
  • Czech
  • Danish
  • English
  • Esperanto
  • Finnish
  • French
  • German
  • Hindi
  • Hungarian
  • Italian
  • Japanese
  • Korean
  • Norwegian
  • Persian
  • Polish
  • Portuguese
  • Russian
  • Turkish
  • Swedish
  • Thai

Installation

By default profanity-check supports English languages however you can as many language as you wish through the configuration object

import {Filter} from 'profanity-check'
const defaultFilter = new Filter()
// or
const multiLanguageFilter = new Filter({languages: ["arabic", "english", "french"]})

console.log(defaultFilter.isProfane("what the fuck is going on?")) // true
console.log(multiLanguageFilter.isProfane("انها عاهرة")) // true

Todo

  • add sanitizing function to replace bad words with symbols

Keywords

profanity

FAQs

Package last updated on 20 Jul 2022

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