npm i @siyabasa/singlish

@siyabasa/singlish

The transliteration engine for modern Singlish applications.

usage.ts
1import { convertSinglishToSinhala } from '@siyabasa/singlish'
2
3const sinhala = convertSinglishToSinhala('aayuboowan')
4console.log(sinhala) // ආයුබෝවන්
Live PreviewReal-time
 

INTERACTIVE DEMO

Try it yourself — type and see real-time Singlish to Sinhala conversion

Singlish Mode0 characters

FEATURES

Built with computer-science first approach for production-grade performance

Deterministic Phoneme Tokenization

100% accuracy for complex conjuncts and vowel modifiers through rigorous phonetic parsing.

Zero-Latency Architecture

O(n) time complexity using prefix-trie based lookahead parser. Optimized for the critical rendering path.

Universal Runtime

Isomorphic design that runs seamlessly on Edge, Node.js, and in the Browser with zero configuration.

React IME Hook

Drop-in useSinglishConverter hook that manages cursor position, input history, and IME state automatically.

Auto-Attach

Zero-config DOM hydration using MutationObserver to automatically enhance all input fields.

Ready to build?

API REFERENCE

Simple, powerful API designed for developer experience

convertSinglishToSinhala

convertSinglishToSinhala(text: string): string

Pure function to transpile Singlish text to Sinhala Unicode. Stateless and synchronous, designed for high-throughput server-side rendering.

example.ts
1import { convertSinglishToSinhala } from '@siyabasa/singlish'
2
3const output = convertSinglishToSinhala('aayuboowan')
4// Output: "ආයුබෝවන්"