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

tibetan-ewts-converter

v2.0.0

Published

Tibetan transliteration (Wylie, EWTS) and approximate phonetics

Readme

Tibetan Phonetics and Transliteration

This JavaScript package implements two things:

Installation

npm install tibetan-ewts-converter

As of version 2, this is a pure ES module.

Usage

Wylie/EWTS conversion:

import { EwtsConverter } from 'tibetan-ewts-converter/EwtsConverter';
const ewts = new EwtsConverter();
console.log(ewts.to_unicode("sangs rgyas"));
console.log(ewts.to_ewts("སངས་རྒྱས"));

Approximate phonetics:

import { get_phonetics } from 'tibetan-ewts-converter';
const pho = get_phonetics({ style: "lotsawahouse", lang: "en" });
console.log(pho.phonetics("sangs rgyas", { autosplit: true }));

EwtsConverter options

The constructor accepts an optional object with named options:

  • check: generate warnings for illegal consonant sequences and the like; default is true.
  • check_strict: stricter checking, examine the whole stack; default is true.
  • fix_spacing: remove spaces after newlines, collapse multiple tseks into one, fix case, etc; default is true.
  • sloppy: silently fix a number of common Wylie mistakes when converting to Unicode; default is false
  • leave_dubious: when converting to Unicode, leave dubious syllables unprocessed, between [brackets], instead of doing a best attempt; default is false
  • pass_through: when converting to EWTS, pass through non-Tib characters instead of converting to [comments]; default is false
let ewts = new EwtsConverter({ check_strict: false, leave_dubious: true, sloppy: true });

TibetanPhonetics options

get_phonetics accepts an optional object with named options:

  • style: one of 'thl', 'lotsawahouse', 'rigpa', 'lhasey', 'padmakara'
  • lang: 2-letter language code, for styles that have language variants (ex. 'en', 'es')

The phonetics method takes a string (Tibetan Unicode or EWTS), and an optional options object.

Unless you're using a better external tokenizer, always pass the option { autosplit: true }.

See the code for lots of other options allowing fine control of phonetics generation. You can also directly import and use the classes TibetanPhonetics, TibetanPhoneticsRigpa, TibetanPhoneticsLhasey and TibetanPhoneticsPadmakara.

Code and history

The first version of this code was written in Perl around 2008. In 2010 the EWTS/Unicode converter was ported to Java at the request of TBRC, now BDRC.

The Java code for phonetics was then ported to other languages by different groups:

Phonetics generation was added to this project in 2025, also ported from the original perl with the help of AI.

License

Apache 2.0.