transliterator

Turn strings that contain cyrillic characters into ascii compliant text

npm install transliterator
8 downloads in the last week
16 downloads in the last month

Transliterator

A node module that transforms strings that contain cyrillic characters into ascii compliant text. node-transliterator replaces characters with codes not normally viewable.

Example use cases:

  • Parsing strings containing emojis
  • URL slugs
  • Replacing characters with accents

Installation

npm install transliterator --save

API

var transliterator = require('transliterator');
  • transliterator(string, [replacement])
transliterator('źebŕa') // 'zebra'
transliterator('ǿ\'doules.') // 'o\'doules.'
transliterator('i hatè véggiês') // 'i hate veggies'

transliterator('a') // 'a'
transliterator('harǤold') // 'harold'
transliterator('䫸 is ŗŒ') // ' is rOE'

transliterator('', 'h') // 'h'
transliterator('Ⓩbad ሏ', '_') // '_bad _'
transliterator('պ պ պ պ', '_') // '_ _ _ _'
npm loves you