Cuss: Map of profane words to a rating of sureness

https://news.ycombinator.com/rss Hits: 8
Summary

cuss Map of profanities, slurs, and obscenities to a sureness rating. Contents What is this? This package exposes lists of profane words in several languages. This rating does not represent how vulgar a term is. It represents how likely it is to be used as either profanity or clean text. When should I use this? Use this for researching natural language. Don’t use it to make a “profanity filter”. Those are bad. Install This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm: npm install cuss In Deno with esm.sh : import { cuss } from 'https://esm.sh/cuss@2' In browsers with esm.sh : < script type =" module " > import { cuss } from 'https://esm.sh/cuss@2?bundle' </ script > Use import { cuss } from 'cuss' import { cuss as cussPt } from 'cuss/pt' console . log ( Object . keys ( cuss ) . length ) // 1776 console . log ( Object . keys ( cussPt ) . length ) // 173 console . log ( cuss . beaver ) // 0 console . log ( cuss . asshat ) // 2 console . log ( cussPt . burro ) // 1 console . log ( cussPt . bixa ) // 2 API cuss exports the following entries: cuss — English — English cuss/ar-latn — Arabic (Latin) — Arabic (Latin) cuss/es — Spanish — Spanish cuss/fr — French — French cuss/it — Italian — Italian cuss/pt — Portuguese — Portuguese cuss/pt-pt — European Portuguese Each entry exports the identifier cuss . There are no default exports. cuss Map of offensive words to a sureness rating ( Record<string, number> ). Each rating is a number between 0 and 2 (both including), representing the certainty the key is used as a profanity depending on context. Rating Use as a profanity Use in clean text Example 2 likely unlikely asshat 1 maybe maybe addict 0 unlikely likely beaver Data Types This package is fully typed with TypeScript. It exports no additional types. Compatibility This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers. Related buzzwords — ...

First seen: 2025-06-02 12:35

Last seen: 2025-06-02 20:37