translit-rus-eng

1.0.8 • Public • Published

TranslitRusEng

Transliteration script for rus-eng and eng-rus transitions.

Based on ISO 9/ГОСТ 7.79 standard (with a few improvements).

  • No dependencies, only 4Kb
  • Transliterate from Russian to English and vice versa

Usage:

import translitRusEng from 'translit-rus-eng';

translitRusEng (string, options)

string: string/array/object values to transliterate (Russian or English)

options: object, can include booleans 'engToRus', 'slug' (to make url-friendly slug-like strings) or 'lowerCase' (to force transliteration into lowercase)


Examples:

translitRusEng ("Kol'skij poluostrov", { engToRus: true }):

"Кольский полуостров"

translitRusEng ("Широкая электрификация южных губерний", { slug: true }):

"shirokaya_elektrifikacziya_yuzhnyh_gubernij"

translitRusEng ("Скушай ещё этих мягких булочек", { lowerCase: true }):

"skushaj eshhyo e`tih myagkih bulochek"

Package Sidebar

Install

npm i translit-rus-eng

Weekly Downloads

301

Version

1.0.8

License

ISC

Unpacked Size

6.7 kB

Total Files

3

Last publish

Collaborators

  • macseam