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

ainconv

v0.6.0

Published

Ainu writing system converter.

Readme

ainconv - Ainu language script converter

npm GitHub issues npm GitHub DeepWiki

Overview

This npm package provides a comprehensive set of functions for converting text between different writing systems of the Ainu language.

Currently, Latin (Romanization), Katakana, Cyrillic and Hangul scripts are supported. We are also planning to convert between different romanization systems and Katakana variants. Currently only the more adopted version of Latin script and lossy Katakana script are supported. The converted string are always in lower case.

Important Note

Conversion between Latin, Cyrillic and Hangul script are lossless, however, conversion between Katakana and other scripts are lossy. This means that converting from Katakana to other scripts and then back to Katakana may not give the original string and the result may be ambiguous or even incorrect.

This is because the Katakana script used broadly for the Ainu language is intrinsically ambiguous. For example, it does not distinguish between tow and tu (both トゥ), iw and i.u (both イウ), ay and a.i (both アイ), etc. Some alternative Katakana scripts are proposed to solve this problem, but none of them are widely adopted. We are planning to support some of these alternative scripts in the future.

Installation

Install the package using npm (or bun, yarn, pnpm, etc.)

npm install ainconv

Usage

Word Conversion

import { convert } from 'ainconv';

console.log(convert('イランカラㇷ゚テ', 'Kana', 'Latn')); // 'irankarapte'
console.log(convert('irankarapte', 'Latn', 'Kana')); // 'イランカラㇷ゚テ'
console.log(convert('иранкараптэ', 'Cyrl', 'Latn')); // 'irankarapte'
console.log(convert('irankarapte', 'Latn', 'Cyrl')); // 'иранкараптэ'
console.log(convert('이란가랍더', 'Hang', 'Latn')); // 'irankarapte'
console.log(convert('irankarapte', 'Latn', 'Hang')); // '이란가랍더'

// or use the alternative api

import {
    convertLatnToKana,
    convertKanaToCyrl,
    // ...
} from 'ainconv';
convertLatnToKana('aynukotan'); // 'アイヌコタン'
convertKanaToCyrl('アイヌコタン'); // аинукотан

Extra Functionality

Script Detection

Detect the script of a given string.

import { detect } from 'ainconv';

console.log(detect('aynu')); // 'Latn'
console.log(detect('アイヌ')); // 'Kana'
console.log(detect('айну')); // 'Cyrl'
console.log(detect('애누')); // 'Hang'

Syllable Splitting

import { separate } from 'ainconv';

console.log(separate('eyaykosiramsuypa')); // [ 'e', 'yay', 'ko', 'si', 'ram', 'suy', 'pa' ]

Documentation

We have an AI-generated detailed documentation for this package at DeepWiki.

Development

We use bun as the build tool.

Build

bun run build

Test

bun test

License

MIT License (c) 2023 mkpoli

See also