Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

any-ascii

anyascii20.8kISC0.3.2TypeScript support: included

Unicode to ASCII transliteration

unicode, ascii, transliteration, utf8, romanization, slug, emoji, unidecode, normalization

readme

AnyAscii

Unicode to ASCII transliteration

Web Demo

Converts Unicode characters to their best ASCII representation

AnyAscii provides ASCII-only replacement strings for practically all Unicode characters. Text is converted character-by-character without considering the context. The mappings for each script are based on popular existing romanization systems. Symbolic characters are converted based on their meaning or appearance. All ASCII characters in the input are left unchanged, every other character is replaced with printable ASCII characters. Unknown characters and some known characters are replaced with an empty string and removed.

import anyAscii from 'any-ascii';

const s = anyAscii('άνθρωποι');
// anthropoi

npm install any-ascii

FULL README

changelog

Changelog

0.3.2 - 2023-03-15

  • Data additions and improvements
  • Python - Add type comments
  • Python - Fix Python 3.11 deprecation warning for importlib.resources.read_binary()
  • Python - Use PEP 621 metadata instead of PEP 518 [tool.flit.metadata]
  • Java - Flatten release pom.xml

0.3.1 - 2022-04-06

  • Data additions and improvements
  • Elixir - Initial release (2022-04-28)
  • Java - Release on Maven Central
  • Rust - Increase minimum requirement from Rust 1.36 to 1.42

0.3.0 - 2021-09-02

  • Data additions and improvements
  • C - Initial release
  • JavaScript - Add types
  • .NET - Rewrite, increase minimum requirement from .NET Standard 1.0 to .NET Core 3.0

0.2.0 - 2021-04-18

  • Data additions and improvements
  • JavaScript - Use ESM instead of CommonJS

0.1.7 - 2020-10-19

  • Data additions and improvements
  • Go - Rename to github.com/anyascii/go
  • Java - Rename to com.anyascii:anyascii
  • Julia - Initial release
  • Python - Compress data files
  • Python - Build using flit with PEP 517/518 pyproject.toml instead of setuptools with setup.py
  • Ruby - Compress data files
  • Rust - Use no_std, increase minimum requirement from Rust 1.20 to 1.36

0.1.6 - 2020-07-28

  • Data additions and improvements
  • PHP - Initial release (2020-07-31)
  • Shell - Initial release

0.1.5 - 2020-05-01

  • Data additions and improvements
  • .NET - Initial release

0.1.4 - 2020-03-20

  • Data additions and improvements

0.1.3 - 2020-02-26

  • Data additions and improvements

0.1.2 - 2020-02-14

  • Data additions and improvements
  • Go - Initial release as github.com/hunterwb/any-ascii
  • Ruby - Initial release
  • Rust - Initial release

0.1.1 - 2020-01-26

  • Data additions and improvements

0.1.0 - 2020-01-23

  • Initial release
  • Java - Initial release with JitPack as com.hunterwb:any-ascii
  • JavaScript - Initial release
  • Python - Initial release