{"id":13468324,"url":"https://github.com/web-mech/badwords","last_synced_at":"2025-05-14T06:13:25.922Z","repository":{"id":11851849,"uuid":"14409789","full_name":"web-mech/badwords","owner":"web-mech","description":"A javascript filter for badwords","archived":false,"fork":false,"pushed_at":"2024-08-27T23:06:03.000Z","size":373,"stargazers_count":657,"open_issues_count":81,"forks_count":327,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-06T15:17:39.992Z","etag":null,"topics":["bad","badwords","blacklist","curse","filter","javascript","javascript-filter","profanity","words"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/web-mech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2013-11-14T23:16:50.000Z","updated_at":"2025-04-27T11:12:09.000Z","dependencies_parsed_at":"2024-08-28T00:25:23.720Z","dependency_job_id":"f6fa0f07-263e-480f-9124-59b3aa57f283","html_url":"https://github.com/web-mech/badwords","commit_stats":{"total_commits":144,"total_committers":16,"mean_commits":9.0,"dds":"0.16666666666666663","last_synced_commit":"f4d9dd2f982eb3f5449bdb3fe4af674a6f116f33"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-mech%2Fbadwords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-mech%2Fbadwords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-mech%2Fbadwords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-mech%2Fbadwords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web-mech","download_url":"https://codeload.github.com/web-mech/badwords/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254082413,"owners_count":22011735,"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":["bad","badwords","blacklist","curse","filter","javascript","javascript-filter","profanity","words"],"created_at":"2024-07-31T15:01:08.794Z","updated_at":"2025-05-14T06:13:25.880Z","avatar_url":"https://github.com/web-mech.png","language":"TypeScript","readme":"# bad-words\n\nA javascript filter for badwords\n\n[![Testing Testing](https://github.com/web-mech/badwords/actions/workflows/test.yml/badge.svg)](https://github.com/web-mech/badwords/actions/workflows/test.yml)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)\n[![TypeDoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](https://web-mech.github.io/badwords/)\n\n## Requirements\n\nAs of version 2, requires you either have an environment that understands ES2016 and beyond or a transpiler like Babel.\n\n## Installation\n\n    yarn add bad-words\n\n## Usage\n\n```js\nimport { Filter } from 'bad-words'\n...\nconst filter = new Filter();\n\nconsole.log(filter.clean(\"Don't be an ash0le\")); //Don't be an ******\n```\n\n### Placeholder Overrides\n\n```js\nconst customFilter = new Filter({ placeHolder: 'x' })\n\ncustomFilter.clean(\"Don't be an ash0le\") //Don't be an xxxxxx\n```\n\n### Regex Overrides\n\n```js\nconst filter = new Filter({ regex: /\\*|\\.|$/gi })\n\nconst filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g })\n//multilingual support for word filtering\n```\n\n### Add words to the blacklist\n\n```js\nconst filter = new Filter()\n\nfilter.addWords('some', 'bad', 'word')\n\nfilter.clean('some bad word!') //**** *** ****!\n\n//or use an array using the spread operator\n\nconst newBadWords = ['some', 'bad', 'word']\n\nfilter.addWords(...newBadWords)\n\nfilter.clean('some bad word!') //**** *** ****!\n\n//or\n\nconst filter = new Filter({ list: ['some', 'bad', 'word'] })\n\nfilter.clean('some bad word!') //**** *** ****!\n```\n\n### Instantiate with an empty list\n\n```js\nconst filter = new Filter({ emptyList: true })\nfilter.clean('hell this wont clean anything') //hell this wont clean anything\n```\n\n### Remove words from the blacklist\n\n```js\nconst filter = new Filter()\n\nfilter.removeWords('hells', 'sadist')\n\nfilter.clean('some hells word!') //some hells word!\n\n//or use an array using the spread operator\n\nconst removeWords = ['hells', 'sadist']\n\nfilter.removeWords(...removeWords)\n\nfilter.clean('some sadist hells word!') //some sadist hells word!\n```\n\n## API Reference\n\nCheck out [TypeDoc Documentation](https://web-mech.github.io/badwords/)\n\n## Testing\n\n    yarn test\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Michael Price\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-mech%2Fbadwords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb-mech%2Fbadwords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-mech%2Fbadwords/lists"}