Skip to content

Quick Start

Install Profanity Kit and run your first detector.

Updated View as Markdown

Install

npm i profanity-kit

Create a detector

import { createDetector } from "profanity-kit";

const detector = createDetector();
detector.check("This contains shit"); // true
detector.isClean("This is fine"); // true
detector.filter("hide the shit"); // "hide the ****"

findAll() returns ordered match details when you need offsets or language codes. Next, choose languages or learn matching.

Compatibility

Profanity Kit supports Node.js >=22.13.0 and modern browsers under the Baseline Widely Available policy. It publishes a single ESM implementation; modern Node.js can load the same files with require() when the module graph has no top-level await.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close