Skip to content

profanity-checker

Cloudflare Worker that checks text or usernames for profanity with Jev on Workers AI, including disguised look-alike spellings.

LibrarybetaMIT

Overview

profanity-checker is a Cloudflare Worker that checks text and usernames for profanity using TypeSafe's Jev through Workers AI (typesafe/jev). For kind text it asks one Noul question about literal profanity, allowing mild non-aggressive words like 'damn'. For kind username it asks two questions in one call: literal profanity, and profanity disguised phonetically or with look-alike characters such as mike_hunt or a55h0le; the handle is flagged if either clears the threshold.

The Worker returns is_profane, the maximum probability, per-question probabilities so callers can apply their own policy, and the 0.5 threshold. Threshold, max policy, JSON response and OpenAPI schema (via chanfana and Hono) live in Worker code. Other Workers can call it through a service binding with no public URL or auth, or via plain fetch. MIT licensed.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this text contain profanity?yes · no
Yes / noDoes this username contain profanity disguised phonetically or with look-alike characters?yes · no

How it works

  1. POST text or a username to /api/profanity-check.
  2. Ask one or two Noul questions in one Workers AI call.
  3. Take the max probability and compare with 0.5.
  4. Return the verdict and raw probabilities.

Strengths

  • Catches disguised profanity in handles.
  • Service binding for internal use.
  • Raw probabilities for custom policies.

Caveats

  • Fixed default threshold may not suit all communities.
  • Runs on Cloudflare Workers AI.

Getting started

Deploy the Worker with wrangler, then call it via a service binding or POST /api/profanity-check.

At a glance

Type
Library
Status
beta
Language
TypeScript
Runtime
Cloudflare Worker
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Trust & safety: Cloudflare Worker that asks Jev `Noul` for literal profanity in text or usernames and a second `Noul` for phonetic or look-alike disguise (`a55h0le`, `mike_hunt`); the threshold, `max()` policy, JSON response, and OpenAPI schema live in Worker code and the endpoint is callable from other Workers via service bindings.

    yibie/awesome-jev
  • Deploy this Worker once, then call it from your other Workers.

    logicrw/awesome-jev-projects

Frequently asked questions

What extra check do usernames get?

A second question for phonetic or look-alike disguised profanity.

Are mild words flagged?

Mild words like 'damn' used non-aggressively are allowed.

How do other Workers call it?

Through a service binding, with no public URL needed.

Related projects

  • WordPress plugin connecting sites to Jev, with PHP helpers for choice, score and yes/no decisions plus a REST proxy and JS client.

    ProjectbetaPHP
  • WordPress connector that lets themes and plugins ask Jev typed questions and branch on probabilities, choices or scores.

    ServicebetaPHP
  • Chrome extension that uses your Jev key to hide high-confidence sexual and solicitation replies on X behind reversible placeholders.

    Browser extensionproductionTypeScript
  • One-file Mastra input processor that asks Jev whether a message must be blocked, failing open behind a deadline and circuit breaker.

    ProjectproductionTypeScript
  • Chrome and Firefox extension that hides AI-written posts on X, LinkedIn, Reddit and YouTube by asking Jev 30 narrow style questions.

    Browser extensionproductionJavaScript
  • Text-only pseudonymous Spanish forum where Jev approves clearly clean posts and everything else goes to Claude, then humans.

    ProjectproductionJavaScript