transliteration-with-spice

0.2.9 • Public • Published

This is a tool that allows to generate all common used transliterations.

Supported transliterations

  • Armenian -> Cyrillic (Russian, ru)
  • Armenian -> ASCII (English, en)
  • Russian -> ASCII (English, en)

Install

$ npm install transliteration-with-spice --save

Usage

const transliterate = require('transliteration-with-spice');
// The function takes 2 arguments,
// 1st argument is the text that needs to be transliterated,
// 2nd argument is ISO-639-1 language code to which the text needs to be transliterated,
// 2nd argument is an optional, the default value is "en".

const translitsHY2EN = transliterate('բարե՛ւ աշխարհ');
console.log(translits.join(', '));
// barev ashkharh, barev askharh, barev ashxarh, barev asxarh

const translitsHY2RU = transliterate("բարե՛ւ աշխարհ", 'ru');
console.log(translits.join(', '));
// барев ашхар, барев ашхарх

const translitsRU2EN = transliterate('привет мир!');
console.log(translits.join(', '));
// privet mir!, privyot mir!, privot mir!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.9
    1
    • latest

Version History

Package Sidebar

Install

npm i transliteration-with-spice

Weekly Downloads

10

Version

0.2.9

License

GPL-3.0

Unpacked Size

52.5 kB

Total Files

6

Last publish

Collaborators

  • otanim