cyrillic-to-translit-js-with-y
v2.0.0
Published
Simple javascript function for converting Cyrillic symbols to Translit
Downloads
5
Maintainers
Readme
cyrillic-to-translit-js
Simple javascript function for converting Cyrillic symbols to Translit
Install
npm install --save cyrillic-to-translit-js
Simple to use
Constructor
{ preset: ru }
or empty - transliteration preset for Russian language.{ preset: uk }
- transliteration preset for Ukranian language (see PR #27).
transform()
cyrillicToTranslit().transform(input, spaceReplacement);
input
- string which should be transformedspaceReplacement
- symbol for space replacement
Examples
cyrillicToTranslit().transform('привет мир!');
>privet mir!
cyrillicToTranslit().transform('привет мир!', "_")
>privet_mir!
cyrillicToTranslit({ preset: "uk" }).transform('привіт світе!', "_")
>pryvit_svite!
Typescript
Typescript supports starting form v2.0.0. See definitions here
Credits
License
MIT © Aleksandr Filatov alfilatov.com