profanity-checker
Cloudflare Worker that checks text or usernames for profanity with Jev on Workers AI, including disguised look-alike spellings.
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
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this text contain profanity? | yes · no |
| Yes / no | Does this username contain profanity disguised phonetically or with look-alike characters? | yes · no |
How it works
- POST text or a username to /api/profanity-check.
- Ask one or two Noul questions in one Workers AI call.
- Take the max probability and compare with 0.5.
- 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-jevDeploy 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.
ProjectbetaPHPWordPress connector that lets themes and plugins ask Jev typed questions and branch on probabilities, choices or scores.
ServicebetaPHPChrome extension that uses your Jev key to hide high-confidence sexual and solicitation replies on X behind reversible placeholders.
Browser extensionproductionTypeScriptOne-file Mastra input processor that asks Jev whether a message must be blocked, failing open behind a deadline and circuit breaker.
ProjectproductionTypeScriptChrome and Firefox extension that hides AI-written posts on X, LinkedIn, Reddit and YouTube by asking Jev 30 narrow style questions.
Browser extensionproductionJavaScriptText-only pseudonymous Spanish forum where Jev approves clearly clean posts and everything else goes to Claude, then humans.
ProjectproductionJavaScript