{"id":29395269,"url":"https://github.com/sandeep-shome/text-warden","last_synced_at":"2025-12-30T22:12:44.778Z","repository":{"id":303768609,"uuid":"1015195758","full_name":"sandeep-shome/text-warden","owner":"sandeep-shome","description":"A lightweight utility library for detecting and sanitizing sensitive or unsafe text content in strings.","archived":false,"fork":false,"pushed_at":"2025-07-09T09:52:26.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-09T10:41:11.132Z","etag":null,"topics":["changesets","commitizen","commitlint","eslint","lint-staged","nodejs","npm-package","prettier","tsup","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/text-warden","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/sandeep-shome.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2025-07-07T06:34:29.000Z","updated_at":"2025-07-09T09:52:07.000Z","dependencies_parsed_at":"2025-07-09T10:41:50.653Z","dependency_job_id":"2a32ac29-c00b-4064-ae83-250327595a38","html_url":"https://github.com/sandeep-shome/text-warden","commit_stats":null,"previous_names":["sandeep-shome/text-warden"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sandeep-shome/text-warden","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeep-shome%2Ftext-warden","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeep-shome%2Ftext-warden/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeep-shome%2Ftext-warden/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeep-shome%2Ftext-warden/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandeep-shome","download_url":"https://codeload.github.com/sandeep-shome/text-warden/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeep-shome%2Ftext-warden/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264572312,"owners_count":23630226,"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":["changesets","commitizen","commitlint","eslint","lint-staged","nodejs","npm-package","prettier","tsup","typescript"],"created_at":"2025-07-10T11:27:33.117Z","updated_at":"2025-12-30T22:12:44.740Z","avatar_url":"https://github.com/sandeep-shome.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n![NPM Unpacked Size (with version)](https://img.shields.io/npm/unpacked-size/text-warden/0.2.1)\n![GitHub Release](https://img.shields.io/github/v/release/sandeep-shome/text-warden)\n![NPM Downloads](https://img.shields.io/npm/dm/text-warden)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/sandeep-shome/text-warden/release.yml)\n\n# text-warden\n\nA lightweight utility library for detecting and sanitizing sensitive or unsafe text content in strings. Ideal for filtering offensive words, enforcing content policies, or building text moderation features in Node.js and frontend applications\n\n## 🚀 Features\n\n- 🔍 Simple `isSafeText` function to check for unsafe or banned words.\n- ⚡ Lightweight and fast – no dependencies.\n- 🧩 Easily extensible for custom word lists or rules.\n\n## ⬇️ Installation\n\nInstall text-warden with npm\n\n```bash\nmd my-app\ncd my-app\nnpm install text-warden\n```\n\n## 💿 Usage/Examples\n\n```javascript\nimport { isSafeText } from 'text-warden';\n\nconst result = isSafeText('Hello world!');\nconsole.log(result); // true or false based on content\n```\n\n## 🧰 Functions/Methods\n\nUsage and parameter list of all available functions\n\n### `isSafeText()`\n\nChecks if the given text is safe by detecting unsafe or profane words\n\n```javascript\nimport { isSafeText } from 'text-warden';\n\nconst customOptions = {\n  extendUnsafeWords: ['foo', 'bar'],\n};\n\nconst result = isSafeText('Foo is bad', customOptions);\nconsole.log(result); // false\n```\n\n| Parameter                 | Type       | Required | Description                                                                 |\n| ------------------------- | ---------- | -------- | --------------------------------------------------------------------------- |\n| **text**                  | `string`   | `true`   | The input text to validate for unsafe or sensitive words.                   |\n| extendUnsafeWords         | `string[]` | `false`  | Adds additional words to the list of unsafe words. Useful for custom rules. |\n| skipChecksFor             | `string[]` | `false`  | Words to exclude from being flagged, even if they appear in unsafe lists.   |\n| disableDefaultUnsafeWords | `boolean`  | `false`  | Set to true to ignore the built-in list of unsafe words.                    |\n\n## 🤝 Contribution\n\nContributions are welcome and appreciated!\nIf you have suggestions for improvements, feel free to open an issue or submit a pull request.\nLet’s make text-warden better together! 🐝✨\n\n## 🚀 Run Locally\n\nClone the project\n\n```bash\ngit clone https://github.com/sandeep-shome/text-warden.git\n```\n\nGo to the project directory\n\n```bash\ncd text-warden\n```\n\n🔧 Install dependencies\n\n```bash\nnpm install\n```\n\n_You can now explore and modify the package as per your needs._\n\n📦 Build the Project\n\n```bash\nnpm run build\n```\n\n## 🧪 Running Tests\n\nFollow the steps below to run and verify the functionality of the CLI and validation logic.\n\n```bash\nnpm run test\n```\n\n## 🔧 Built With\n\n- [**TypeScript**](https://www.typescriptlang.org/) – Strongly typed language for scalable JavaScript development\n- [**Vitest**](https://vitest.dev/) – Fast unit testing framework with great DX\n- [**tsup**](https://tsup.egoist.dev/) – Super-fast TypeScript bundler powered by esbuild\n\n## 📎Appendix\n\ntext-warden is an open-source project developed and maintained by a solo developer with a passion for clean code, creativity, and community-driven tools.\n\nYou're welcome to explore, use, and contribute to the project! Whether it's fixing a bug, suggesting a feature, or improving the documentation — your contributions are highly appreciated.\n\nFeel free to check out the GitHub repository and join in making this project better for everyone. Let's build something fun together! 💡\n\n## 👨‍💻 Authors\n\n[@Sandeep Shome](https://github.com/sandeep-shome)\n\n## 📄 License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## 🙋‍♂️ Support\n\nFor support, email sandeepshome.dev@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeep-shome%2Ftext-warden","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandeep-shome%2Ftext-warden","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeep-shome%2Ftext-warden/lists"}