normalize-diacritics

Remove accents/ diacritics in string

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
normalize-diacritics
5524.0.36 months ago7 years agoMinified + gzip package size for normalize-diacritics in KB

Readme

normalize-diacritics

Remove accents/ diacritics in string




!Follow mefollow-me-badgefollow-me-url
!Versionversion-badgeversion-url !Node versionnode-version-badgenode-version-url !MIT Licensemit-license-badgemit-license-url
!Downloadsdownloads-badgedownloads-url !Total downloadstotal-downloads-badgedownloads-url !Packagephobiapackagephobia-badgepackagephobia-url !Bundlephobiabundlephobia-badgebundlephobia-url
!ciga-badgega-url !codecovcodecov-badgecodecov-url
!Code of Conductcoc-badgecoc-url
Simple NPMnpm-url package to remove any accents/ diacritics found in a string.

Table of contents

- TypeScript or ES Modules - Browser - normalize(input) - normalizeSync(input) - Code of Conduct

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 denomod/normalizediacritics.

API Reference

normalize(input)


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 Conductcoc-url. By participating in this project you agree to abide by its terms.

License

MIT License © Rong Sen Ng