Neptunium, Promethium, Manganese

    confusables
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    npm MIT gzip size

    Confusables

    This library allows you to easily remove confusables from a string, into normal english characters.

    Try it out: https://confusables.netlify.com/

    Installation

    yarn add confusables
    
    npm install confusables
    

    Usage

    Removing confusables

    const { remove } = require('confusables');
    import remove from 'confusables'; // with ES modules
     
    remove('Ἢἕļľᦞ ш٥ṟlᑰ! Hello World!'); // => Hello World! Hello World!
    remove('Iлtèrnåtïonɑlíƶatïǫԉ'); // => Internationalization

    Injecting random confusables

    const { obfuscate } = require('confusables');
    import { obfuscate } from 'confusables'; // with ES modules
     
    obfuscate('Hello World!'); // => Ḣé𝑙ŀ𝟶 Ꮤᴑ𝖗łᏧ
    obfuscate('Internationalization'); // => ᶦṅᵗᧉ𝘳𝓃ȧťί𝙾ቢค𝞲ἱƶ𝜶ナἰøʼn

    List of supported confusable characters

    const { characters } = require('confusables');
    import { characters } from 'confusables'; // with ES modules
     
    console.log(characters);

    What are confusables?

    Confusable characters are those that may be confused with others (in some common UI fonts), such as the Latin letter "o" and the Greek letter omicron "ο". Fonts make a difference: for example, the Hebrew character "ס" looks confusingly similar to "o" in some fonts (such as Arial Hebrew), but not in others.

    Source

    Keywords

    none

    Install

    npm i confusables@1.0.0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    119 kB

    Total Files

    16

    Last publish

    Collaborators

    • gc