https://github.com/imranbarbhuiya/decancer
A package to remove zalgo and common confusables from strings.
https://github.com/imranbarbhuiya/decancer
clean confusing decancer hacktoberfest zalgo
Last synced: about 1 month ago
JSON representation
A package to remove zalgo and common confusables from strings.
- Host: GitHub
- URL: https://github.com/imranbarbhuiya/decancer
- Owner: imranbarbhuiya
- License: mit
- Created: 2022-05-29T18:11:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T16:56:21.000Z (about 1 month ago)
- Last Synced: 2025-04-09T17:51:17.139Z (about 1 month ago)
- Topics: clean, confusing, decancer, hacktoberfest, zalgo
- Language: TypeScript
- Homepage: https://imranbarbhuiya.github.io/decancer
- Size: 13 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# @imranbarbhuiya/decancer
[](https://github.com/imranbarbhuiya/decancer/blob/main/LICENSE)
[](https://codecov.io/gh/imranbarbhuiya/decancer)
[](https://www.npmjs.com/package/@imranbarbhuiya/decancer)## Description
A package to remove zalgo and common confusable characters from strings.
Read Full Documentation [here](https://imranbarbhuiya.github.io/decancer).
## Features
- Written In Typescript
- Offers CJS, ESM and UMD builds
- Full TypeScript & JavaScript support> **Note**
> This project is not perfect, false-positives may happen.## Installation
You can use the following command to install this package, or replace npm install with your package manager of choice.
```bash
npm i @imranbarbhuiya/decancer
```## Usage
```ts
import { decancer, isCancerous, cancerPercentage } from '@imranbarbhuiya/decancer';// Check if a string is cancerous
isCancerous('hello world'); // false
isCancerous('vEⓡ𝔂 𝔽𝕌Ňℕy ţ乇𝕏𝓣'); // truecancerPercentage('vEⓡ𝔂 𝔽𝕌Ňℕy ţ乇𝕏𝓣', true); // 67
cancerPercentage('My name is Stale'); // 0// Decancer a string
const result = decancer('Ḣ͚͇͎̰̙̗̹́͟e̞̪̫̣͖̱͍̻̲ͧ̌̀̚̚͘͜w̸̡͕̽̈̾ͬw̥̪͈̖̻ͭ̈́̽ͫ̈͘ơ̢̞ͭͣ̅̑ͭ͗̒̃ ̸͔̝̟̟̳̝͋̄ͥ̈͞W̸͍̬̎̊̎̑͆̐̀̕ò̰̙̺̋ͭ͗́̄̚͝r̪͈̹͈ͧ̅ͨ͛͋͛̃͒̌́l̴̡̰̰͇̪̘̱ͯ̈̓ͨ̕d͎͙̥̩̔̾ͦ̀͞'); // 'Hewwo World'
```## Buy me some doughnuts
If you want to support me by donating, you can do so by using any of the following methods. Thank you very much in advance!
## Contributors ✨
Thanks goes to these wonderful people: