Numbers Prefer Multiplication

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

    3.0.0 • Public • Published

    normalize-diacritics

    Remove accents/ diacritics in string


    Follow me

    Version Node version MIT License

    Downloads Total downloads Packagephobia Bundlephobia

    CircleCI Dependency Status codecov Coverage Status

    codebeat badge Codacy Badge Code of Conduct

    Simple NPM package to remove any accents/ diacritics found in a string.

    Table of contents

    Pre-requisite

    Install

    # Install via NPM
    $ npm i normalize-diacritics

    Usage

    TypeScript or ES Modules

    import { normalize } from 'normalize-diacritics';
    
    /** Assuming top-level await is enabled... */
    await normalize('söme stüff with áccènts'); // 'some stuff with accents'

    Browser

    <script type="module">
      import { normalize } from 'https://cdn.skypack.dev/normalize-diacritics@latest';
      
      // --snip
    </script>

    Demo

    Edit normalize-diacritics demo

    deno

    👉 Check out the deno module at deno_mod/normalize_diacritics.

    API Reference

    normalize([input])

    • input <?string> Optional input string that contains accents/ diacritics.
    • returns: <Promise<string>> Promise which resolves with normalized input string.

    This method normalizes any accents/ diacritics found in a given input string and output a normalized string as a result.

    normalizeSync([input])

    This methods works the same as normalize([input]) except that this is the synchronous version.

    Contributing

    Code of Conduct

    Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

    License

    MIT License © Rong Sen Ng

    Install

    npm i normalize-diacritics

    DownloadsWeekly Downloads

    9,524

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    38.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • motss