{"id":2130692,"url":"https://github.com/retextjs/retext-profanities","last_synced_at":"2025-10-04T12:22:45.518Z","repository":{"id":3517061,"uuid":"49829680","full_name":"retextjs/retext-profanities","owner":"retextjs","description":"plugin to check for profane and vulgar wording","archived":false,"fork":false,"pushed_at":"2023-09-12T09:49:25.000Z","size":197,"stargazers_count":44,"open_issues_count":0,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-25T16:42:32.519Z","etag":null,"topics":["natural-language","profanity","retext","retext-plugin"],"latest_commit_sha":null,"homepage":"https://unifiedjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/retextjs.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified"},"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-17T18:27:19.000Z","updated_at":"2024-06-18T13:49:35.958Z","dependencies_parsed_at":"2024-06-18T13:49:29.001Z","dependency_job_id":"4db2b20b-cf72-4aa5-9ea2-e70ebb9bee17","html_url":"https://github.com/retextjs/retext-profanities","commit_stats":{"total_commits":142,"total_committers":8,"mean_commits":17.75,"dds":0.05633802816901412,"last_synced_commit":"2627fb0875b5d03609f383389f1c54657882705a"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-profanities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-profanities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-profanities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-profanities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retextjs","download_url":"https://codeload.github.com/retextjs/retext-profanities/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713258,"owners_count":20983683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["natural-language","profanity","retext","retext-plugin"],"created_at":"2024-01-21T23:25:30.429Z","updated_at":"2025-10-04T12:22:40.466Z","avatar_url":"https://github.com/retextjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":["JavaScript"],"sub_categories":[],"readme":"# retext-profanities\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[retext][]** plugin to check for potential bad words.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(retextProfanities[, options])`](#unifieduseretextprofanities-options)\n    *   [`Options`](#options)\n*   [Data](#data)\n*   [Messages](#messages)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([retext][]) plugin to check for possible\n[profane or otherwise vulgar][profanities] wording.\nIt uses [`cuss`][cuss] for sureness.\n\n## When should I use this?\n\nYou can use this plugin when you’re dealing with your own text and want to\ncheck for potential mistakes.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install retext-profanities\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport retextProfanities from 'https://esm.sh/retext-profanities@8'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import retextProfanities from 'https://esm.sh/retext-profanities@8?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nSay our document `example.txt` contains:\n\n```txt\nHe’s pretty set on beating your butt for sheriff.\n```\n\n…and our module `example.js` contains:\n\n```js\nimport retextEnglish from 'retext-english'\nimport retextProfanities from 'retext-profanities'\nimport retextStringify from 'retext-stringify'\nimport {read} from 'to-vfile'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await unified()\n  .use(retextEnglish)\n  .use(retextProfanities)\n  .use(retextStringify)\n  .process(await read('example.txt'))\n\nconsole.error(reporter(file))\n```\n\n…then running `node example.js` yields:\n\n```txt\nexample.txt\n1:33-1:37 warning Be careful with `butt`, it’s profane in some cases butt retext-profanities\n\n⚠ 1 warning\n```\n\n## API\n\nThis package has an export map with several entries for plugins in different\nlanguages:\n\n*   `retext-profanities/ar-latn` — Arabic (Latin-script)\n*   `retext-profanities/en` — English\n*   `retext-profanities/es` — Spanish\n*   `retext-profanities/fr` — French\n*   `retext-profanities/it` — Italian\n*   `retext-profanities/pt` — Portuguese\n*   `retext-profanities/pt-pt` — Portuguese (Portugal)\n*   `retext-profanities` — English\n\nEach module exports the plugin [`retextProfanities`][api-retext-profanities] as\nthe default export.\n\n### `unified().use(retextProfanities[, options])`\n\nCheck for potential bad words.\n\n###### Parameters\n\n*   `options` ([`Options`][api-options], optional)\n    — configuration\n\n###### Returns\n\nTransform ([`Transformer`][unified-transformer]).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n*   `ignore` (`Array\u003cstring\u003e`, optional)\n    — phrases *not* to warn about\n*   `sureness` (`0`, `1`, or `2`, default: `0`)\n    — minimum *sureness* to warn about, see [`cuss`][cuss]\n\n## Data\n\nSee [`cuss`][cuss].\n\n## Messages\n\nEach message is emitted as a [`VFileMessage`][vfile-message], with `source` set\nto `'retext-profanities'`, `ruleId` to the normalized phrase, `actual` to the\npotential bad word, `expected` to an empty array, and `profanitySeverity` to\nthe `cuss` severity of the phrase.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `retext-profanities@^8`,\ncompatible with Node.js 16.\n\n## Related\n\n*   [`retext-equality`](https://github.com/retextjs/retext-equality)\n    — check possible insensitive, inconsiderate language\n*   [`retext-passive`](https://github.com/retextjs/retext-passive)\n    — check passive voice\n*   [`retext-simplify`](https://github.com/retextjs/retext-simplify)\n    — check phrases for simpler alternatives\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`retextjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/retextjs/retext-profanities/workflows/main/badge.svg\n\n[build]: https://github.com/retextjs/retext-profanities/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-profanities.svg\n\n[coverage]: https://codecov.io/github/retextjs/retext-profanities\n\n[downloads-badge]: https://img.shields.io/npm/dm/retext-profanities.svg\n\n[downloads]: https://www.npmjs.com/package/retext-profanities\n\n[size-badge]: https://img.shields.io/bundlejs/size/retext-profanities\n\n[size]: https://bundlejs.com/?q=retext-profanities\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/retextjs/retext/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[health]: https://github.com/retextjs/.github\n\n[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/retextjs/.github/blob/main/support.md\n\n[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[cuss]: https://github.com/words/cuss\n\n[profanities]: https://github.com/words/profanities\n\n[retext]: https://github.com/retextjs/retext\n\n[unified]: https://github.com/unifiedjs/unified\n\n[unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[vfile-message]: https://github.com/vfile/vfile-message\n\n[api-retext-profanities]: #unifieduseretextprofanities-options\n\n[api-options]: #options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-profanities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretextjs%2Fretext-profanities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-profanities/lists"}