Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cyrillic-to-translit-js

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cyrillic-to-translit-js

Simple javascript function for converting Cyrillic symbols to Translit

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

cyrillic-to-translit-js

Codeship Status for greybax/cyrillic-to-translit-js

NPM version NPM Downloads/month Build Status Coveralls Status Dependency Status DevDependency Status

Simple javascript function for converting Cyrillic symbols to Translit

Demo page

Patreon

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()

Convert Cyrillic symbols to Translit

cyrillicToTranslit().transform(input, spaceReplacement);

  • input - string which should be transformed
  • spaceReplacement - symbol for space replacement

reverse()

Convert Translit symbols to Cyrillic

cyrillicToTranslit().reverse(input, spaceReplacement);

  • input - string which should be transformed
  • spaceReplacement - symbol for space replacement

Examples

  • transform()
  cyrillicToTranslit().transform('Привет Мир!');

  >Privet Mir!
  cyrillicToTranslit().transform('привет мир!', "_")

  >privet_mir!
  cyrillicToTranslit({ preset: "uk" }).transform('привіт світе!', "_")

  >pryvit_svite!
  • reverse()
  cyrillicToTranslit().reverse("ulitsa Soyuza Pechatnikov")

 >улица Союза Печатников
  cyrillicToTranslit({ preset: "uk" }).reverse("Rozghon Uliana i Harashchenko Khrystyna")

  >Розгон Уляна і Гаращенко Христина

Typescript

Typescript supports starting form v2.0.0. See definitions here

Credits

License

MIT © Aleksandr Filatov alfilatov.com

Keywords

FAQs

Package last updated on 15 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc