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 🙏

© 2024 – Pkg Stats / Ryan Hefner

levantinetransliterator

v2.1.4

Published

Transliterator for Lebanese, Syrian, Jordanian and Palestinian

Downloads

7

Readme

levantinetransliterator

Transliterator from:

  • arabizi or arabic to pronunciation (le3be => ləʕbə)
  • arabizi to arabic script (siyyara => سيارة)
  • pronunciation to approximate arabic transcription( ləʕbə => لِعبِ)

Install

npm -i levantinetransliterator

Demo

As used on LevantineDictionary.com levantine dictionary logo

For more details, try to add a translation in the dictionary and see all 3 in use when adding Arabic and Pronunciation.

Usage of arabizi to arabic transliterator

import ld from "levantinetransliterator";

ld.transliterate("mar7aba");
//output: مَرحَبة مَرحَبى مَرحَبا مَرحابة مَرحابى مَرحابا مارحَبة مارحَبى مارحَبا مارحابة مارحابى مارحابا

ld.transliterate("lebnene");
//output: لِبنِنِ لِبنِني لِبنِنة لِبنانِ لِبناني لِبنانة لابنِنِ لابنِني لابنِنة لابنانِ لابناني لابنانة

ld.transliterate("ordone");
//output: اُردُنِ اُردُني اُردُنة اُردونِ اُردوني اُردونة اُرضُنِ اُرضُني اُرضُنة اُرضونِ اُرضوني اُرضونة

ld.transliterate("soury");
//سوري صوري

ld.transliterate("kifak");
//output: كِفَك كِفَق كِفاك كِفاق كيفَك كيفَق كيفاك كيفاق قِفَك قِفَق قِفاك قِفاق قيفَك قيفَق قيفاك قيفاق

ld.transliterate("ba3rif");
//بَعرِف بَعريف باعرِف باعريف

ld.transliterate("bantalon");
//بَنتَلُن بَنتَلون بَنتالُن بَنتالون بَنطَلُن بَنطَلون بَنطالُن بَنطالون بانتَلُن بانتَلون بانتالُن بانتالون بانطَلُن بانطَلون بانطالُن بانطالون

Usage of arabizi to pronunciation transliterator

import ld from "levantinetransliterator";

ld.pronunciate("le3be");
// ləʕbə, ləʕbe, leʕbə, leʕbe

Usage of pronunciation to arabic approximation transliterator

import ld from "levantinetransliterator";

ld.toArb("ləʕbə");
// لِعبِ

If you want to add your own rules, you can either modify the source code or pass a "rules" array in the format:

import ld from "levantinetransliterator";
const rules = [
  // S = staart, M = 'middle', E = 'end'
  { rule: "A", l: "b", a: ["ب"] },
  { rule: "A", l: "p", a: ["ب"] },
  { rule: "A", l: "bb", a: ["بّ"] },
];
// third paramater is a limit on results.
ld.custom("ləʕbə", rules, 100);

Contributions welcomed!