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

15919ify

v2.0.2

Published

Token-based Indic script transliteration utility, supports almost all scripts in ISO15919

Readme


An open-source web utility designed to take in text in 7 Bit ISO 15919 format and transcode it into various Indic Scripts. While built with a modular architecture capable of scaling to multiple languages, it currently only has support for the ones in the standard as mentioned below. Current Malayalam setup is made taking huge liberties like introducing various character combinations not in the current standard (ie, chillu letters).

Try the tool out here

Made for Hackclub Stardance !! Check out the project page

File structure

  • 15919.js - The core parsing engine and transliteration framework. Currently only supports mapping to Malayalam, Tamil, Kannada, Telugu and Devanagiri but can be modified to accomodate other languages
  • dicts.js - All UNICODE mappings and other DICTS have been moved to this file after v1.6.1

Features

  • Scans input strings character-by-character, intelligently grouping multi-character consonant and vowel clusters (up to 3-character keys)
  • Dictionary based mapping system covering all letters and symbols in the following langauges

Scripts supported

  • Malayalam (id: malayalam)
  • Tamil (id: tamil)
  • Kannada (id: kannada )
  • Telugu (id: telugu)
  • Devenagari (id: devanagari)
  • Odia (id: odia)
  • Bengali (id: bangla)
  • Asamiya (id: asamiya)
  • Gurumukhi (id: gurumukhi)
  • Gujarati (id: gujarati)
  • Kaithi (id: kaithi)
  • Sinhala (id: sinhala)
  • Tibetan (id: tibetan)
  • Saurashtra (id: saurashtra)

Syntax and Typing

For a basic idea on how this system works, refer to the following tables for typing instructions based on the modified 7Bit ISO 15919

For Devs (js only method)

ES modules

Import the functions from the public entry point:

import {
    convertText,
    tokenize,
    scanAndParse,
    LANGUAGE_REGISTRY
} from "15919ify";

Not all these functions are required for usage, import as needed. (vide explainations below)

Convert text

Use convertText(inputText, lang) to transliterate Latin input into the requested script. Example :

import { convertText } from "15919ify";

console.log(convertText("namaskaaram", "malayalam"));
console.log(convertText("namaste", "devanagari"));
console.log(convertText("vanakkam", "tamil"));

Parameters

| Parameter | Type | Description | | --- | --- | --- | | InputText | string | Latin transliteration input. | | lang | string | Output script identifier (vide scripts supported) |

Returns : string containing the converted text.

An unsupported language identifier throws an Error.

convertText("example", "unsupported");
// Error: Unknown output script: unsupported

Tokenize input

Use tokenize(inputText, options) when you need the parsed tokens rather than the final script output.

import { tokenize } from "15919ify";

const tokens = tokenize("namaskaaram");

console.log(tokens);

The optional options object supports:

  • autoAnu - type : Boolean, default : false, Enables the parser's automatic anusvara rule.

Example:

const tokens = tokenize("namaskaaram", {
    autoAnu: true
});

Returns : an array of token objects.

Parsed tokens have the following structure:

{
    consonant: "...", // mapped consonant, or null
    vowel: "...",     // mapped vowel, or null
    raw: "..."        // consumed input
}

Whitespace and unrecognized characters have different structures:

{ type: "SPACE", raw: " " }

{ type: "UNKNOWN", raw: "?" }

Inspect type before accessing consonant or vowel, since these fields are not present on whitespace and unknown-character tokens.

Parse input directly

scanAndParse(inputText, autoAnu) exposes the underlying scanner and parser.

import { scanAndParse } from "15919ify";

const tokens = scanAndParse("namaskaaram", false);

Parameters

  • inputText (string) : Latin input
  • autoAnu (boolean) : Whether to enable automatic anusvara handling

Returns : an array of parsed tokens. Unlike tokenize(), this function takes the option as a direct argument instead of an options object.

latinify.js

Only exposes one function toLatinText(input, lang)

  • input must be in indic character of chosen lang
  • lang is lanaguge id explained earlier.

This function takes in Indic Language strings (of chosen lang) and outputs it in our modified latin format.

Importing and usage

import "toLatinText" from "15919ify/latinify.js"

toLatinify("\u0D39\u0D48", "malayalam");

Access the language registry

LANGUAGE_REGISTRY exposes the configuration used by convertText()

import { LANGUAGE_REGISTRY } from "15919ify";

console.log(Object.keys(LANGUAGE_REGISTRY));
console.log(LANGUAGE_REGISTRY.malayalam);

Each language configuration contains:

  • autoAnu: automatic anusvara behavior.
  • dict: the dictionary used for output conversion.
  • virama: the script's virama character.

The registry is currently exported as a mutable object. Direct modifications can affect subsequent conversions. Treat its internal structure as implementation-level configuration

Parser behavior and limitations

  • Input is converted to lowercase before parsing. Original capitalization is not preserved.
  • The parser uses greedy matching, preferring recognized three-character sequences, then two-character sequences, then single characters.
  • Unrecognized characters are passed through as UNKNOWN tokens.
  • Characters that exist in the ISO 15919 mapping but not in the script will be consumed.
  • Spaces are emitted as SPACE tokens. Newlines are not currently handled as a dedicated whitespace token.
  • Output conversion depends on the selected script dictionary and its vowel-sign mappings.
  • The parser does not guarantee that every possible Latin input has a valid transliteration.
  • tokenize() does not select a language; its automatic anusvara option defaults to false.

Automatic anusvara handling

  • Some language configurations enable automatic anusvara handling. When enabled, the parser recognizes m as the special ";m" dictionary token when it is followed by a space, newline, or recognized punctuation character.
  • The behavior is controlled by the language configuration when using convertText(). For direct calls to tokenize() or scanAndParse(), the caller controls the option.
  • This is a parser-specific rule, not a general linguistic guarantee. Its output depends on the configured dictionary and the context in which m occurs.

Exports in the code

ES modules

export  {
    convertText,
    tokenize,
    scanAndParse,
    LANGUAGE_REGISTRY
};

CommonJS

module.exports = {
    convertText,
    tokenize,
    scanAndParse,
    LANGUAGE_REGISTRY
};

Dev Notes :

  • Bengali and Assamese have separate registry entries but currently share the same dictionary object. Their handling of the Ra character is distinguished in the output conversion logic.
  • When adding a script, provide its dictionary and configure its virama and automatic anusvara behavior.

Disclaimers

  • The ISO standard 15919 is used for transliterating text from Indic Languages to Latin, while this tool does the opposite, converts text from the latin format (vide next line) and converts it into various scripts.
  • Chillu letters (in malayalam) are typed using the symbol * as a prefix, and this symbol doesnt not exist in the standard and is a tool specific implementation I made up.

Installation

npm install 15919ify

License

This project is open-source under the MIT License.