transliterate.js is a lightweight JavaScript library for converting Unicode text into plain ASCII. It transliterates accented characters, symbols, and non-Latin characters using Unicode normalization and configurable character mappings, making it suitable for URL slug generation, filename normalization, search indexing, data processing, and other text transformation tasks in both browser and Node.js environments.
Key Features
- Unicode to ASCII transliteration
- Unicode normalization (NFC, NFD, NFKC, NFKD)
- Configurable character mappings
- Default Latin character mappings
- Custom transliteration rules
- Browser and Node.js compatibility
- Lightweight with no runtime dependencies
- BSD 3-Clause License
Typical Applications
- URL slug generation
- Filename normalization
- Search indexing
- Text preprocessing
- Data migration
- Import and export pipelines
- Legacy software compatibility
- Unicode cleanup
Installation
Install the latest version from NPM.
npm install @playfulsparkle/transliterate-jsor
yarn add @playfulsparkle/transliterate-jsDownload Details
- GitHub URL: https://github.com/playfulsparkle/transliterate.js
- npm: https://www.npmjs.com/package/@playfulsparkle/transliterate-js
