@achivx/obscenity

0.0.1 • Public • Published

Obscenity

An obscene language/profanity detector.

⚠️ WARNING: This repository contains materials that some may find offensive. That's intentional.

This package uses the List of Dirty, Naughty, Obscene, and Otherwise Bad Words along with few custom dictionaries. It also takes some ways of profanity obfuscation (such as leetspeak) into account. It's all done to build the worst regular expression publicly available.

How to use

The package is available on npmjs.com and can be installed using npm:

npm i @achivx/obscenity

Then it can be used as follows:

const obscenity = require("@achivx/obscenity");

obscenity.detect("Scunthorpe (/ˈskʌnθɔːrp/) is an industrial town in the North Lincolnshire district of Lincolnshire, England.")
// -> undefined

obscenity.detect('The town\'s name contains the substring "cunt".')
// -> ["cunt"]

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @achivx/obscenity

      Weekly Downloads

      0

      Version

      0.0.1

      License

      MIT

      Unpacked Size

      309 kB

      Total Files

      31

      Last publish

      Collaborators

      • feseoz