0.7.0 • Published 2 years ago

@vm75/inditrans v0.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

inditrans

A functional transliterator library for the most common Indic/Brahmic scripts.

  • No dependencies and no server needed. Uses wasm for near native performance.
  • Supports ITRANS toggle transliteration with ## and skipping XML tags
  • Special handling for scripts like Tamil, Malayalam, Gurmukhi, etc. Tuned for reability.
  • Supports vedic accents for vedic scriptures.

References:

Supported scripts

Installation

npm install @vm75/inditrans

Usage example

import * as inditrans from 'inditrans';

async function test() {
  // Init needs to complete before Inditrans could be used
  await indiTrans.init();

  result = inditrans.transliterate(
    "श्री॒ गु॒रु॒भ्यो नमः॒ । ह॒रिः॒ ओ३म् ॥",
    inditrans.Script.devanagari,
    inditrans.Script.tamil,
    inditrans.Option.IgnoreVedicAccents + inditrans.Option.TamilSuperscripted
  );
  ...
}