Skip to content

Developer libraries

arabic-kit

Arabic toolkit: spelling-tolerant search, normalization, slugs, transliteration, digits, direction and number-to-words (تفقيط) for invoices.

The problem

Arabic input is messy: أحمد and احمد, مدرسة and مدرسه, ٢٠٢٦ and 2026. Naive string comparison fails on all of them, which breaks search, deduplication and URL routing.

How it solves it

arabic-kit handles these cases so your product does not have to. It is written in TypeScript with no runtime dependencies, and was extracted from the Arabic-first products MirrorORG builds.

Features

  • normalize and normalizeForSearch, with every step togglable
  • includesArabic and equalsArabic ignore spelling variants
  • slugify keeps Arabic or transliterates to ASCII
  • Digit conversion between Western, Arabic and Persian
  • detectDirection, using the first-strong-character rule of dir="auto"
  • toArabicWords with correct agreement, up to 10¹⁵
  • toArabicCurrencyWords for invoices in EGP, SAR, AED and USD

Install and try

Who it is for

  • Frontend and Node.js developers
  • Bilingual products
  • Invoicing systems
git clone https://github.com/mashraf1997/arabic-kit.git && cd arabic-kit
npm install
npm test

Questions

Is arabic-kit free?

Yes. arabic-kit is open source under the MIT licence, so you can use it in personal and commercial projects.

What does it run on?

It is written in TypeScript. The README lists its requirements, usage and full API.

How do I report a problem?

Open an issue in the GitHub repository.

Does MirrorORG use it?

arabic-kit handles these cases so your product does not have to. It is written in TypeScript with no runtime dependencies, and was extracted from the Arabic-first products MirrorORG builds.

More tools

bundle-budget

Node.js

Performance budgets for build output (raw, gzip, brotli) with baselines, Markdown PR reports and CI exit codes.

Standard Webhooks signing and verification with key rotation, replay protection and retrying delivery. Born from Mersal's event pipeline.

Audits a domain's SPF, DKIM, DMARC, MX, MTA-STS and TLS-RPT records, grades it A–F and gives step-by-step fixes. Built on lessons from Bosta.