🥷 🥷 🥷
Made with 💖 by StatusPlus
- Removing Invisible Characters: Easily remove invisible characters from strings!
- Clearing Lookalikes: Ridding strings of characters that look like normal english letters/chars!
- Constantly updating Database: Database of lookalikes can update with new ideas!
Simply run:
npm i lookalike-util
That's it! You're good to go!
In the <head>
of your HTML document, add the following:
<head>
<!-- Other HTML head items -->
<script src="https://cdn.jsdelivr.net/npm/lookalike-util/dist/web/lookalike.js" defer>
</head>
You can now reference using lookalikeUtil
!
To compile from source, first clone the repository from GitHub:
git clone https://github.com/Status-Plus/lookalike-util.git
git fetch
Then, install all dependencies:
npm i
To run the testing suite, run:
npm test
To build the UMD
compatibile package, run:
npm run build
For lints, run:
npx eslint . --fix
import { clearSimilar } from '../src/index';
const string = "Êċℎọ!"
console.log(clearSimilar(string)) // returns "Echo!"
<!-- snip -->
<script>
window.lookalikeUtil.clearSimilar('Êċℎọ!'); // returns "Echo!"
</script>
Returns a string
with all "invisible" characters removed. (Not spaces).
Example:
lookalikeutil.clearInvisible("i am a ninja!") // returns string w/o invisible characters!
Returns a string
with all non-english characters that are abused to look like an english letter to bypass a filter, etc.
Example:
lookalikeutil.clearSimilar("Êċℎọ!") // returns "Echo!"
This is used internally by our team in our Discord bot and similar applications with the purpose of removing sneaky characters that are often abused by bad actors to bypass a filter or make it hard to contact them. Someone could bypass a word filter by using these special characters. This soloves that issue!
To contribute, please follow the above section regarding compiling from source.
From there, feel free to work using src/index.js
If you would like to contibute to the database, please use lib/lookalike.js
.
Before sending a pull request, please ensure tests, lints, and builds pass. Otherwise, CI will not pass!
This project is open-source under the MIT license: