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
console.lognormalizeUnicodeText'øqßweŁffÆǣ'// oqssweLffAEae console.lognormalizeUnicodeText'äÄàÀãÃçÇõÕûÛýÝñ'// aAaAaAcCoOuUyYn