Natural Preference for Minification

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

    0.2.1 • Public • Published

    npm MIT gzip size

    Confusables

    This library allows you to easily remove confusables from a string.

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

    Installation

    yarn add confusables
    
    npm install confusables
    

    Usage

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

    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@0.2.1

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    46.2 kB

    Total Files

    9

    Last publish

    Collaborators

    • gc