Install
npm i profanity-kityarn add profanity-kitpnpm add profanity-kitbun add profanity-kitCreate 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.