npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

lycy

v1.0.0

Published

Uzbek to Cyrillic transliterator

Downloads

27

Readme

UzLatin ↔ UzCyrillic Transliterator

Loyiha haqida

Bu loyiha o'zbek so'zlari va matnlarini lotin alifbosidan kirill alifbosiga va kirill alifbosidan lotin alifbosiga o'girish uchun mo'ljallangan. Dastur murakkab o'zbek so'zlarini, chet tilidan o'zlashgan so'zlarni va maxsus qoidalarni hisobga olgan holda aniq transliteratsiya qiladi.

Xususiyatlari

  • Lotin alifbosidan kirill alifbosiga o'girish (latinToCyrillic funksiyasi)
  • Kirill alifbosidan lotin alifbosiga o'girish (cyrillicToLatin funksiyasi)
  • 500 dan ortiq so'zlar uchun maxsus qoidalar
  • O'zlashgan so'zlar, xususan rus tilidan o'zlashgan so'zlarni to'g'ri transliteratsiya qilish
  • Harflar joylashuviga qarab qo'llaniladigan murakkab qoidalarni qo'llab-quvvatlash
  • Maxsus belgilar, qo'shtirnoqlar va tinish belgilarini to'g'ri o'girish

O'rnatish

# npm orqali o'rnatish
npm install lycy

# yarn orqali o'rnatish
yarn add lycy

# pnpm orqali o'rnatish
pnpm add lycy

Foydalanish

import { latinToCyrillic, cyrillicToLatin } from 'lycy';

// Lotin alifbosidan kirill alifbosiga
const cyrillicText = latinToCyrillic("O'zbekiston Respublikasi");
console.log(cyrillicText); // Ўзбекистон Республикаси

// Kirill alifbosidan lotin alifbosiga
const latinText = cyrillicToLatin("Ўзбекистон Республикаси");
console.log(latinText); // O'zbekiston Respublikasi

Maxsus so'zlar va qoidalar

Dastur 500 dan ortiq so'zlar uchun maxsus qoidalarni qo'llaydi. Bu so'zlar ko'pincha chet tilidan o'zlashgan bo'lib, ular standart transliteratsiya qoidalariga bo'ysunmaydi. Masalan:

  • "funksiya" -> "функция" (oddiy "funksya" emas)
  • "biolyuminessensiya" -> "биолюминесценция"
  • "pensiya" -> "пенсия"

Bunday so'zlar uchun exactWordMap, specialWordMap va patternWordMap lug'atlari yaratilgan.

Qo'shimcha funktsiyalar

Dastur quyidagi holatlarni ham qo'llab-quvvatlaydi:

  • Qo'shtirnoqlar bilan ishlash ("" -> «»)
  • Maxsus harflar: g', o' va boshqalar
  • So'z ohiridagi yumshoq belgini to'g'ri ishlatish

About the Project

This project provides tools for transliterating Uzbek words and texts from Latin to Cyrillic alphabet and vice versa. The algorithm handles complex Uzbek words, loanwords, and special rules to ensure accurate transliteration.

Features

  • Latin to Cyrillic conversion (latinToCyrillic function)
  • Cyrillic to Latin conversion (cyrillicToLatin function)
  • Special rules for over 500 words
  • Proper transliteration of loanwords, especially those borrowed from Russian
  • Support for complex rules based on letter positioning
  • Correct handling of special characters, quotation marks, and punctuation

Installation

# Install with npm
npm install lycy

# Install with yarn
yarn add lycy

# Install with pnpm
pnpm add lycy

Usage

import { latinToCyrillic, cyrillicToLatin } from 'lycy';

// Latin to Cyrillic
const cyrillicText = latinToCyrillic("O'zbekiston Respublikasi");
console.log(cyrillicText); // Ўзбекистон Республикаси

// Cyrillic to Latin
const latinText = cyrillicToLatin("Ўзбекистон Республикаси");
console.log(latinText); // O'zbekiston Respublikasi

Special Words and Rules

The library implements special rules for more than 500 words. These words are often loanwords that don't follow standard transliteration rules. For example:

  • "funksiya" -> "функция" (not simply "funksya")
  • "biolyuminessensiya" -> "биолюминесценция"
  • "pensiya" -> "пенсия"

Dictionaries like exactWordMap, specialWordMap, and patternWordMap are used to handle these special cases.

Additional Functionality

The library also supports:

  • Handling quotation marks ("" -> «»)
  • Special characters: g', o', and others
  • Proper handling of soft sign at the end of words

Technical Details

The implementation uses pattern matching and dictionary-based replacement to ensure accurate transliteration. The code is structured around several key data structures:

  1. exactWordMap: Maps exact words that need special transliteration
  2. specialWordMap: Handles special cases like "sirka" -> "сирка"
  3. patternWordMap: Manages pattern-based replacements like "tsiya" -> "ция"
  4. Character arrays: Map individual Latin and Cyrillic characters

Contributing

Contributions are welcome to improve the transliteration rules, add more special cases, or optimize the code.