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 🙏

© 2024 – Pkg Stats / Ryan Hefner

iuliia

v0.8.2

Published

Transliterate Cyrillic → Latin in every possible way

Downloads

2,030

Readme

Iuliia

Transliterate Cyrillic → Latin in every possible way

This is the TypeScript port of the Python iuliia package

NPM Version Build Status Code Coverage Code Quality

Transliteration means representing Cyrillic data (mainly names and geographic locations) with Latin letters. It is used for international passports, visas, green cards, driving licenses, mail and goods delivery etc.

Iuliia makes transliteration as easy as:

// Typescript, ES6
import * as iuliia from "iuliia";
iuliia.translate("Юлия Щеглова", iuliia.WIKIPEDIA);
'Yuliya Shcheglova'
// CommonJS
const iuliia = require("iuliia");
iuliia.translate("Юлия Щеглова", iuliia.WIKIPEDIA);
'Yuliya Shcheglova'

Why use Iuliia

  • 20 transliteration schemas (rule sets), including all main international and Russian standards.
  • Correctly implements not only the base mapping, but all the special rules for letter combinations and word endings.
  • Simple API and zero third-party dependencies.

For schema details and other information, see https://iuliia.ru/ (in Russian).

Issues and limitations

Installation

npm install iuliia

Usage

ES2015 JavaScript:

import iuliia from "iuliia";

// list all supported schemas
for (let schemaName of iuliia.Schemas.names()) {
    console.log(schemaName);
}

// transliterate using specified schema
let source = "Юлия Щеглова";
iuliia.translate(source, iuliia.ICAO_DOC_9303);
// "Iuliia Shcheglova"

// or pick schema by name
let schema = iuliia.Schemas.get("wikipedia");
iuliia.translate(source, schema);
// "Yuliya Shcheglova"

ES5 browser JavaScript:

<script src="https://unpkg.com/iuliia@latest/dist/umd/iuliia.min.js"></script>
<script>
    var source = "Юлия Щеглова";
    var result = iuliia.translate(source, iuliia.WIKIPEDIA);
    console.log(result);
</script>

Supported schemas:

ala_lc          iuliia.ALA_LC
ala_lc_alt      iuliia.ALA_LC_ALT
bgn_pcgn        iuliia.BGN_PCGN
bgn_pcgn_alt    iuliia.BGN_PCGN_ALT
bs_2979         iuliia.BS_2979
bs_2979_alt     iuliia.BS_2979_ALT
gost_779        iuliia.GOST_779
gost_779_alt    iuliia.GOST_779_ALT
gost_7034       iuliia.GOST_7034
gost_16876      iuliia.GOST_16876
gost_16876_alt  iuliia.GOST_16876_ALT
gost_52290      iuliia.GOST_52290
gost_52535      iuliia.GOST_52535
icao_doc_9303   iuliia.ICAO_DOC_9303
iso_9_1954      iuliia.ISO_9_1954
iso_9_1968      iuliia.ISO_9_1968
iso_9_1968_alt  iuliia.ISO_9_1968_ALT
mosmetro        iuliia.MOSMETRO
mvd_310         iuliia.MVD_310
mvd_310_fr      iuliia.MVD_310_FR
mvd_782         iuliia.MVD_782
scientific      iuliia.SCIENTIFIC
telegram        iuliia.TELEGRAM
ungegn_1987     iuliia.UNGEGN_1987
wikipedia       iuliia.WIKIPEDIA
yandex_maps     iuliia.YANDEX_MAPS
yandex_money    iuliia.YANDEX_MONEY

Development setup

Install dependencies:

npm ci

Generate schemas from the schemas repository:

npm run generate

Format the source code:

npm run format

Run ESLint checks:

npm run lint

Run unit tests:

npm test

Build JS:

npm run build

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Make sure to add or update tests as appropriate.

Use Conventional Commits for commit messages.

Changelog

License

MIT