{"id":13509328,"url":"https://github.com/xavier/expletive","last_synced_at":"2026-02-21T15:05:39.771Z","repository":{"id":27333510,"uuid":"30808143","full_name":"xavier/expletive","owner":"xavier","description":"Profanity filter library for Elixir","archived":false,"fork":false,"pushed_at":"2025-06-04T06:21:25.000Z","size":40,"stargazers_count":45,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-21T18:49:39.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xavier.png","metadata":{"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}},"created_at":"2015-02-14T20:38:28.000Z","updated_at":"2025-10-14T09:41:00.000Z","dependencies_parsed_at":"2022-07-27T09:32:01.746Z","dependency_job_id":null,"html_url":"https://github.com/xavier/expletive","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xavier/expletive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavier%2Fexpletive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavier%2Fexpletive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavier%2Fexpletive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavier%2Fexpletive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xavier","download_url":"https://codeload.github.com/xavier/expletive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavier%2Fexpletive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29684076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T14:31:22.911Z","status":"ssl_error","status_checked_at":"2026-02-21T14:31:22.570Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-08-01T02:01:06.254Z","updated_at":"2026-02-21T15:05:39.754Z","avatar_url":"https://github.com/xavier.png","language":"Elixir","funding_links":[],"categories":["Text and Numbers"],"sub_categories":[],"readme":"# Expletive\n\nAn obscenity detection and filtering library for Elixir, freely inspired by the [obscenity gem](https://github.com/tjackiw/obscenity).\n\n## Installation\n\nAdd Expletive as a dependency to your project `mix.exs`:\n\n```Elixir\n\ndef deps do\n  [{:expletive, \"~\u003e 0.1.0\"}]\nend\n\n```\n\n## Usage\n\nAll Expletive functions expect a configuration to be passed:\n\n```Elixir\n\nconfig = Expletive.configure(blacklist: ~w[very bad words])\n\nExpletive.profane?(\"this is bad!\", config)\n# =\u003e true\nExpletive.profane?(\"perfectly safe\", config)\n# =\u003e false\n\nExpletive.profanities(\"this is bad, so BAD!\", config)\n# =\u003e [\"bad\", \"BAD\"]\n```\n\n### Sanitization\n\nThe library offers a fairly wide variety of profanity replacement strategies which can be defined at configuration time or passed explicitly.\n\n```Elixir\nExpletive.sanitize(\"this is bad, so BAD!\", config)\n# =\u003e \"This is $#!@%, so %$@!#!\"\n\nExpletive.sanitize(\"this is bad, so BAD!\", config, :stars)\n# =\u003e \"This is ***, so ***!\"\n\nExpletive.sanitize(\"this is bad, so BAD!\", config, :vowels)\n# =\u003e \"This is b*d, so B*D!\n\nExpletive.sanitize(\"this is bad, so BAD!\", config, \":poop:\")\n# =\u003e \"This is :poop:, so :poop:!\n\nExpletive.sanitize(\"this is bad, so BAD!\", config, {:repeat, \"-\"})\n# =\u003e \"This is ---, so ---!\n\nExpletive.sanitize(\"this is bad, so BAD!\", config, :keep_first_letter)\n# =\u003e \"This is b**, so B**!\n\nExpletive.sanitize(\"this is bad, so BAD!\", config, {:keep_first_letter, \"-\"})\n# =\u003e \"This is b--, so B--!\n\n```\n\n### Whitelisting\n\nIf you wish to allow some words present in the blacklist, you can add exceptions to a whitelist at configuration time:\n\n```Elixir\nconfig = Expletive.configure(blacklist: ~w[very bad words], whitelist: ~w[words])\n\nExpletive.profane?(\"words\", config)\n# =\u003e false\n\n```\n\n### Built-in blacklists\n\nThe library comes with a couple of word lists ready to use:\n\n```Elixir\n\nconfig = Expletive.configure(blacklist: Expletive.Blacklist.english)\n\nExpletive.profane?(\"this is batshit crazy!\", config)\n# =\u003e true\n\nconfig = Expletive.configure(blacklist: Expletive.Blacklist.international)\n\nExpletive.profanities(\"ceci n'est pas une pipe\", config)\n# =\u003e [\"pipe\"]\n\n```\n\n## Known Limitations\n\n### I18n concerns\n\nA couple of replacement strategies (`:vowels` and `:nonconsonants`) are currently limited to the english language.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavier%2Fexpletive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxavier%2Fexpletive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavier%2Fexpletive/lists"}