1.1.1 • Published 2 years ago

confusables v1.1.1

Weekly downloads
3,563
License
MIT
Repository
github
Last release
2 years ago

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!'); // => Hello World! Hello World!
remove('Iлtèrnåtïonɑlíƶatïǫԉ'); // => Internationalization

Injecting random confusables

import { obfuscate } from 'confusables'; // with ES modules

obfuscate('Hello World!'); // => Ḣé𝑙ŀ𝟶 Ꮤᴑ𝖗łᏧ
obfuscate('Internationalization'); // => ᶦṅᵗᧉ𝘳𝓃ȧťί𝙾ቢค𝞲ἱƶ𝜶ナἰøʼn
1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

4 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

6 years ago