npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

anti-ttyah

v0.2.0

Published

Content filter for Arabic, French, English, and Tamazight — including Franco-arabe digit-speak.

Readme

Anti-Ttyah

Content filter for Arabic, French, English, and Tamazight — including Franco-arabe digit-speak.

English-only libraries miss mixed-script chat and digit-speak (3 / 7 / 9). Anti-Ttyah folds those variants before matching, then either blocks the text or masks the hits.

CI npm License: MIT

Content warning. This package ships a list of offensive terms. That is the point. Do not paste the wordlist into READMEs, issues, or social posts.

Docs & playground: ben-coderr.github.io/Anti-Ttyah


Install

npm i anti-ttyah

Zero runtime dependencies. Works in Node 18+ and the browser.

Library

We do not show the real listed words here, out of respect for the reader (9*ba).

Nous n’affichons pas les vrais mots listés ici, par respect pour le lecteur.

لم نذكر الكلمات الحقيقية هنا احتراماً للقارئ.

import { contains, mask, inspect, explain, blockedError, createFilter } from "anti-ttyah";

contains("9*ba");               // true  (Franco-arabe)
contains("ق*بة");               // true  (Arabic script)
mask("hello z*bi");             // "hello ****"
inspect("ولد الق*بة");
// { blocked: true, hits: [{ start, end, raw, lang, category }] }

explain("hello z*bi");          // per-token keys (playground / --explain)
blockedError(title, body);      // { error: "PROFANITY_BLOCKED" } | null

Extend or soften the default list without forking:

const filter = createFilter({
  extraTerms: ["customslur"],
  extraPhrases: ["not allowed"],
  allowlist: ["h*ar"],          // skip a false positive
  maskChar: "#",
  maskStyle: "token",           // "***" per hit
  categories: ["sexual", "slur"],
});

Aliases kept for drop-in use: containsProfanity, maskProfanity, profanityError.

Full reference: API.

CLI

npx anti-ttyah "bonjour"
# clean   (exit 0)

npx anti-ttyah --mask "hello z*bi"
npx anti-ttyah --json "hello z*bi"
npx anti-ttyah --explain "hello z*bi"
npx anti-ttyah --categories sexual,insult "hello"
npx anti-ttyah --file comments.txt
echo "text" | npx anti-ttyah

Exit 1 if blocked — useful in CI.

Why not bad-words?

| | typical EN filter | Anti-Ttyah | | --- | --- | --- | | English | yes | yes | | French | sometimes | yes | | Arabic (script + Latin chat) | no | yes | | Franco-arabe digits (3/7/9) | no | yes | | Tamazight | no | conservative list | | Runs offline | yes | yes |

Normalization includes: tashkeel/tatweel strip, أ/إ/آا, ةه, repeat collapse (n*kkkn*k), article prefixes (el / ال), and separator folding (z.e.b.i).

Wordlist

The default list covers Arabic, Franco-arabe, French, English, and Tamazight. Counts are exported as WORDLIST_STATS (including byLang and byCategory). Add project-specific terms with createFilter rather than opening a PR for every local insult.

Scripts

npm test
npm run build
npm run docs:dev

License

MIT. See CONTRIBUTING.md and CODE_OF_CONDUCT.md.


Français

Filtre de contenu arabe, franco-arabe, français, anglais et tamazight. Aucun appel réseau. npm i anti-ttyah

Nous n’affichons pas les vrais mots listés ici, par respect pour le lecteur.

Docs : https://ben-coderr.github.io/Anti-Ttyah/

العربية

فلتر محتوى للعربية والفرانكو-عرب والفرنسية والإنجليزية والأمازيغية. يعمل محلياً بدون واجهة برمجية خارجية.

لم نذكر الكلمات الحقيقية هنا احتراماً للقارئ.

التوثيق: https://ben-coderr.github.io/Anti-Ttyah/