Have ideas to improve npm?Join in the discussion! »

    normalize-unicode-text
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.1 • Public • Published

    Normalize Unicode Text

    Small typed function (~330 bytes) without dependencies that normalizes unicode text. Useful for normalizing strings such as shipping addresses for third party APIs.

    • Diacritics
    • Zero-width characters
    • Uncommon white spaces
    • Non-latin characters (see this list, PRs with more characters are welcome)

    Installation & Usage

    yarn add normalize-unicode-text

    Or drop it as <script src="https://unpkg.com/normalize-unicode-text">. In this case, use window.normalizeUnicodeText.

    Usage

    import { normalizeUnicodeText } from 'normalize-unicode-text'
     
    console.log(normalizeUnicodeText('øqßweŁffÆǣ'))
    // oqssweLffAEae
     
    console.log(normalizeUnicodeText('äÄàÀãÃçÇõÕûÛýÝñ'))
    // aAaAaAcCoOuUyYn

    Install

    npm i normalize-unicode-text

    DownloadsWeekly Downloads

    360

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    6.31 kB

    Total Files

    12

    Last publish

    Collaborators

    • avatar