{"id":21854002,"url":"https://github.com/gmemstr/no-swears","last_synced_at":"2025-10-23T17:02:53.343Z","repository":{"id":54880335,"uuid":"115971249","full_name":"gmemstr/no-swears","owner":"gmemstr","description":"Clean up your JavaScript strings and remove those filthy words.","archived":false,"fork":false,"pushed_at":"2021-01-22T15:25:32.000Z","size":21,"stargazers_count":9,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-17T10:55:29.720Z","etag":null,"topics":["filter","profanity","swearing"],"latest_commit_sha":null,"homepage":"","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/gmemstr.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":"2018-01-02T03:35:31.000Z","updated_at":"2025-05-17T07:48:16.000Z","dependencies_parsed_at":"2022-08-14T05:31:15.628Z","dependency_job_id":null,"html_url":"https://github.com/gmemstr/no-swears","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gmemstr/no-swears","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmemstr%2Fno-swears","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmemstr%2Fno-swears/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmemstr%2Fno-swears/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmemstr%2Fno-swears/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmemstr","download_url":"https://codeload.github.com/gmemstr/no-swears/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmemstr%2Fno-swears/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261130746,"owners_count":23114028,"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":["filter","profanity","swearing"],"created_at":"2024-11-28T01:28:21.388Z","updated_at":"2025-10-23T17:02:48.303Z","avatar_url":"https://github.com/gmemstr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# no-swears\n\nAutomagically filter out swear words in strings\n\n[![npm version](https://badge.fury.io/js/no-swears.svg)](https://badge.fury.io/js/no-swears)\n\nVery simple package for censoring swear words from JavaScript strings,\nreplacing offending words with \"\\*\\*\\*\\*\".\n\n## Usage\n\n```bash\nnpm install --save no-swears\n```\n\n```javascript\n\"use strict\";\n\nconst noswears = require(\"no-swears\");\n```\n\n### filterSwearWords(string, callback)\n\nThis is the most basic filtering function, and requires the offending\nstring and a callback, returning the cleaned up string to the program.\n\n```javascript\nlet badString = \"this is a bitching string\";\n\nnoswears.filterSwearWords(badString, (goodString) =\u003e {\n  console.log(goodString); // \"this is a ****ing string\"\n});\n```\n\n### hasSwears(string, callback)\n\nThis just returns true or false to callback depending on whether the passed string\ncontains a swear word\n\n```javascript\nlet badString = \"this is a bitching string\";\n\nnoswears.hasSwears(badString, (swearBool) =\u003e {\n  console.log(swearBool); // true\n});\n```\n\n### hasSwearsSync(string)\n\nThis just returns true or false synchronously to be used in true/false conditions\n\n```javascript\nlet badString = \"this is a bitching string\";\n\nif (noswears.hasSwearsSync(badString)) {\n  console.log(\"Has swears!\"); // \"Has swears\"!\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmemstr%2Fno-swears","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmemstr%2Fno-swears","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmemstr%2Fno-swears/lists"}