Skip to main content

Welcome to Bitaboom

Bitaboom is a TypeScript-first string utility toolkit focused on Arabic and bilingual (Arabic ↔ English) publishing workflows. It provides a comprehensive set of helpers for Arabic script processing, typography cleanup, and text sanitization.
Interactive Demo: Try the live demo at bitaboom.surge.sh to explore every exported helper with real-time formatting.

Key features

Bitaboom ships with a wide surface of utilities organized into focused areas:

Arabic-first matching

Build diacritic-insensitive regular expressions, collapse tatweel, score Arabic content density, and replace Urdu glyphs

Rich typography normalizers

More than 30 helpers to fix punctuation spacing, quotes, brackets, ellipses, smart quotes, and whitespace quirks

Single-pass preformatter

preformatArabicText consolidates the common formatting pipeline and is optimized for large datasets

Sanitization pipelines

Strip references, URLs, part markers, markdown decorations, escaped spaces, or numbers in bilingual text

Parsing helpers

Validate JSON-ish blobs, split search queries by quotes, balance parentheses/quotes, and expand page range strings

Transliteration polish

Normalize common Arabic prefixes, dedupe apostrophes, replace salutations with ﷺ, and extract initials

Why Bitaboom?

Bitaboom was designed specifically for publishers and developers working with Arabic and Islamic texts. It addresses common challenges in:
  • OCR cleanup: Formatting and typography cleanup for scanned/OCRd manuscripts
  • Content normalization: Harmonizing diacritics, punctuation, and spacing across documents
  • Bilingual workflows: Handling mixed Arabic-English content with proper spacing and formatting
  • LLM integration: Token estimation for Arabic content across multiple providers (OpenAI, Gemini, Claude, Grok)
All exports are tree-shakeable and documented with JSDoc. The project targets ESNext and is built/tested with Bun.

Next steps

Installation

Get started by installing Bitaboom in your project

Quickstart

Learn the basics with working code examples

API Reference

Explore the complete API documentation

GitHub

View the source code and contribute

Build docs developers (and LLMs) love