sinhala-slugify
v1.0.3
Published
[](https://www.npmjs.com/package/sinhala-slugify) [](https://opensource.org/licenses/MIT)
Maintainers
Readme
sinhala-slugify
A lightweight, zero-dependency Node.js library for converting Sinhala Unicode text into SEO-friendly URL slugs. Built on a phonetic transliteration engine, it maps Sinhala sounds to their closest English equivalents — producing slugs that are both human-readable and search-engine optimized.
Features
- Phonetic accuracy — Transliterates Sinhala sounds to English equivalents (e.g.,
පුවත්becomespuwath) - Complex character support — Handles vowel modifiers (පිලි), conjunct characters (බැඳි අකුරු), and special clusters including යංශය and රාකෘත්යාංශය
- SEO-ready output — Strips special characters, normalizes whitespace, and joins words with hyphens
- Zero dependencies — No external packages required
Installation
npm install sinhala-slugifyUsage
const { sinhalaSlugify } = require('./src/index');
const slug = sinhalaSlugify("අලුත් පුවත් 2026");
console.log(slug);