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

lipic-js

v1.1.2

Published

lipic-js transliteration building blocks (data-first)

Readme

lipic-js

Fast transliteration for web text inputs (input, textarea, contenteditable) with a JS/WASM hybrid runtime.

npm License: MIT TypeScript Playground

PlaygroundIssuesDiscussions

Table of Contents

Features

  • Easy integration: Works with input, textarea, and contenteditable elements
  • High performance: Hybrid JavaScript/WebAssembly runtime
  • Multi-language support: 27 Indian and South Asian languages across major scripts
  • Flexible installation: npm, CDN, or self-hosted
  • Type-safe: First-class TypeScript support

Quick Start

Installation

npm install lipic-js

From GitHub (optional):

npm install github:ranjeet-h/lipic-js

Basic Usage

import { enableTransliteration } from "lipic-js";

// Enable transliteration for Hindi
const session = await enableTransliteration({
  language: "hi",
  selector: "input[type='text'], textarea, [contenteditable='true']"
});

// Later, when you want to disable
session.detach();

Supported Languages

Total supported languages: 27

| Script | Languages | |--------|-----------| | Devanagari | hi (Hindi), mr (Marathi), ne (Nepali), sa (Sanskrit), kok (Konkani), mai (Maithili), doi (Dogri), brx (Bodo), sd (Sindhi), hne (Chhattisgarhi), bho (Bhojpuri), raj (Rajasthani), awa (Awadhi) | | Bengali | bn (Bengali), as (Assamese) | | Gujarati | gu (Gujarati) | | Gurmukhi | pa (Punjabi) | | Tamil | ta (Tamil) | | Telugu | te (Telugu) | | Kannada | kn (Kannada) | | Malayalam | ml (Malayalam) | | Odia | or (Odia) | | Meitei Mayek | mni (Manipuri) | | Ol Chiki | sat (Santali) | | Perso-Arabic | ur (Urdu), ks (Kashmiri) | | Sinhala | si (Sinhala) |

Implementation Status

Currently Available (27): hi, mr, ne, sa, bn, as, gu, pa, ta, te, kn, ml, or, kok, mai, doi, brx, sd, hne, bho, raj, awa, mni, sat, ur, ks, si

Usage Options

1. npm Package

npm install lipic-js
import { enableTransliteration } from "lipic-js";

const session = await enableTransliteration({
  language: "hi",
  engineFactoryOptions: { isWasm: "auto" }
});

2. CDN (Script Tag)

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lipic-js.iife.min.js"></script>
<script>
  // API is exposed as window.LipicJS
  (async () => {
    const session = await window.LipicJS.enableTransliteration({
      language: "hi",
      engineFactoryOptions: { isWasm: "auto" }
    });
    window._lipicSession = session;
  })();
</script>

3. Self-Hosted

After npm run build:all, copy dist/ to your server:

<script type="module">
  import { enableTransliteration } from "/assets/lipic-js/index.js";
  const session = await enableTransliteration({
    language: "hi",
    engineFactoryOptions: { isWasm: "auto" }
  });
</script>

Required files for direct hosting:

  • /assets/lipic-js/index.js (or cjs/iife variant)
  • /assets/lipic-js/wasm/rust_core.js
  • /assets/lipic-js/wasm/rust_core_bg.wasm

Configuration

createHybridTransliterationEngine and enableTransliteration support:

  • isWasm: "auto" (default): Use JS for keystrokes and WASM for batch processing when available
  • isWasm: true: Prefer WASM strongly (falls back to JS if WASM files are missing)
  • isWasm: false: Force JS

If dist/wasm files are not present, the library continues with the JavaScript engine without breaking.

Mobile Keyboard Notes

Android/iOS keyboards (for example Samsung Keyboard, SwiftKey, Gboard) may emit composition/replacement input events instead of plain key events. lipic-js now handles these core event paths in the interceptor, but host setup still matters.

Recommended host setup for input, textarea, and contenteditable:

<input
  type="text"
  autocorrect="off"
  autocapitalize="none"
  autocomplete="off"
  spellcheck="false"
  inputmode="text"
/>

Guidelines:

  • Prefer createInputInterceptor / enableTransliteration instead of custom keydown-only handlers.
  • Track composition via compositionstart / compositionend if you build custom integration.
  • Expect mobile IME paths such as insertReplacementText, insertFromComposition, and insertCompositionText.
  • Hard-refresh after upgrades so clients load the latest dist bundle.

Reference implementation:

  • playground/main.js
  • playground/index.html

Build Options

npm run build:js-only
npm run build:with-wasm

Artifacts:

  • dist/
  • dist/wasm/rust_core.js
  • dist/wasm/rust_core_bg.wasm

Development

  • Node.js 18+
  • Rust (optional, only for WebAssembly builds)
npm run build
npm run build:with-wasm
npm run test
npm run typecheck

npm run generate-map:all-languages

Mapping tables are derived from:

npm run generate-map:all-languages

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

git clone https://github.com/ranjeet-h/lipic-js.git
cd lipic-js
npm install
npm run build
npm test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • @indic-transliteration/common_maps for comprehensive transliteration mappings
  • The WebAssembly team for the amazing performance capabilities
  • All contributors and users of this library

Support