npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

transliterate-cyrillic-text-to-latin-url

1.1.0 • Public • Published

Simple module for transliteration of cyrillic text into latin under the rules of Yandex transit

Enable

to use at server side run:

nmp install transliterate-cyrillic-text-to-latin-url
yarn add transliterate-cyrillic-text-to-latin-url

to use in browser download this module refer to the file module/index.js using the src attribute in the script tag.

Usage

The module exposes transliterate function which should be called with one or two parameters of the type String and Boolean. The function returns an output of the type String with all cyrillic characters replaced with latin characters. Example:

const result = transliterate('Урл;; на ру@сск13ом    яз?ыке!!!', false);
result = url-na-russkom-yazyke
 
or
 
const result = transliterate('Урл;; на ру@сск13ом    яз?ыке!!!');
result = url-na-russk13om-yazyke

a method .noConflict is available on transliterate object. This method, when invoken, restores the namespace transliterate to the previous value, if any.

install

npm i transliterate-cyrillic-text-to-latin-url

Downloadsweekly downloads

10

version

1.1.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability