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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@imlogram/core

v0.1.6

Published

Convert, detect, and analyze text between the old and new Uzbek Latin alphabets — code, URL, and markup safe.

Readme

@imlogram/core

npm License: MIT

Özbek tilidagi matnlarni eski va yangi lotin alifbosi hamda kirillça orasida işonçli tarzda konvertatsiya qiladigan, aniqlaydigan va tahlil qiladigan kutubxona. Kod bloklari, URL, email va HTML struktura içidagi matnga heç qaçon tegmaydi — @imlogram/parser şu himoyani ta'minlaydi.

Oʻ / O' / O` → Ö     Gʻ / G' / G` → Ğ     Sh → Ş     Ch → Ç

Örnatiş

pnpm add @imlogram/core
# yoki: npm install @imlogram/core

Node.js, brauzer va Edge runtime'larning (Cloudflare Workers, Vercel Edge) barçasida bir xil işlaydi — heç qanday runtime-specific boğliqlik yöq.

Tezkor boşlaş

import { convertToNew, convertToOld, detect, getStatistics } from "@imlogram/core";

convertToNew("Bu shahar juda chiroyli va go'zal.").text;
// "Bu şahar juda çiroyli va gözal."

convertToOld("Bu şahar juda çiroyli va gözal.").text;
// "Bu shahar juda chiroyli va go'zal."

detect("Bu shahar juda gözal.");
// { classification: "mixed", confidence: 0.5, segments: [...] }

Kod bloklari va URL heç qaçon özgarmaydi:

convertToNew("Ko'ring: https://example.com/Shop va `ShoppingCart` klassi.").text;
// "Köring: https://example.com/Shop va `ShoppingCart` klassi."
//          ^ o'zgarmadi                  ^ o'zgarmadi

API

convertToNew(text, options?) / convertToOld(text, options?)

Eski ↔ yangi lotin alifbosi orasida konvertatsiya. options:

interface ConversionOptions {
  protectUrls?: boolean;   // standart: true
  protectCode?: boolean;   // standart: true
  protectHtml?: boolean;   // standart: true
}

Natija:

interface ConversionResult {
  text: string;
  direction: "old_to_new" | "new_to_old" | "cyrillic_to_latin" | "latin_to_cyrillic";
  changes: Change[];   // har bir o'zgarish: { start, end, from, to, reason }
  stats: { charCount, wordCount, changedCount, readingTimeSec };
}

Muhim: yangi→eski yönaliş 100% deterministik (bitta harflik jadval). Eski→yangi yönaliş esa sh/ch digraf yoki ikkita mustaqil undoş ekanini aniqlaşi kerak (masalan "Is'hoq" ismida) — buning uçun kiçik, kengaytiriladigan istisnolar luğati işlatiladi. Batafsil: istisnolar luğati manbasi.

convertCyrillicToLatin(text, options?) / convertLatinToCyrillic(text, options?)

Özbek kirillçasi ↔ yangi lotin alifbosi. Lotin tomoni ham eski, ham yangi skriptni qabul qiladi (shahar va şahar ikkalasi ham töğri işlaydi).

convertCyrillicToLatin("Бу шаҳар гўзал.").text;   // "Bu şahar gözal."
convertLatinToCyrillic("Bu shahar go'zal.").text;   // "Бу шаҳар гўзал."

detect(text): DetectionResult

Matn eski, yangi yoki aralaş yozuvda ekanini aniqlaydi, gap darajasida:

interface DetectionResult {
  classification: "old" | "new" | "mixed";
  confidence: number;
  segments: { start: number; end: number; classification: "old" | "new" }[];
}

getStatistics(text): LetterStatistics

getStatistics("Shahar chiroyli, bog'da o'ynayapmiz.");
// { letterCounts: { sh: 1, ch: 1, "gʻ": 1, "oʻ": 1 }, totalSpecialChars: 4 }

convertCodeToNew(sourceCode) / convertCodeToOld(sourceCode)

.ts/.tsx fayllar içidagi UI matnini konvertatsiya qiladi — özgaruvçi nomlari, import yöllari, JSX teglari va Tailwind klasslariga tegmasdan:

convertCodeToNew(`
  const [showChanges, setShowChanges] = useState(true);
  return <label placeholder="Matnni shu yerga yozing...">Kirish matni</label>;
`).text;
// showChanges — o'zgarmadi (identifikator)
// "Matnni shu yerga yozing..." → "Matnni şu yerga yozing..." (placeholder — matn)
// "Kirish matni" → "Kiriş matni" (JSX matn tuguni)

Nega ikki yönaliş har xil murakkablikda

Yangi → eski — sof jadval, heç qanday noaniqlik yöq. Eski → yangi — sh/ch digraf yoki ikkita mustaqil harf ekanini aniqlaşi kerak. Bu loyihaning markaziy texnik muammosi; töliq tuşuntiriş: imlogram.uz/hujjatlar.

Boğliq paketlar

Havolalar

Litsenziya

MIT