Confusables
This library allows you to replace confusables in a string with their lookalike English character.
Try it out: https://confusables.gc.codes/
Purpose
When you need to filter/check English text and want any characters that look very similar to English characters, to be converted into those English characters. It does not support other languages - it's not possible to support other languages whilst remaining very practical/effective at normalizing for English.
The main purpose is for filtering profanity: users can easily bypass most filters by changing "fuck" to "fück", this stops that.
Installation
yarn add confusables
npm install confusables
Usage
Removing confusables
import remove from 'confusables';
remove('Ἢἕļľᦞ ш٥ṟlᑰ! Hello World!');
remove('Iлtèrnåtïonɑlíƶatïǫԉ');
Injecting random confusables
import { obfuscate } from 'confusables';
obfuscate('Hello World!');
obfuscate('Internationalization');