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 🙏

© 2026 – Pkg Stats / Ryan Hefner

woocommerce-arabic-seo-helper

v1.0.0

Published

A collection of helper utilities for optimizing WooCommerce stores in Arabic. Features Arabic text normalization, SEO slug generation, and number/digit conversion for local price formats.

Readme

woocommerce-arabic-seo-helper

A lightweight, zero-dependency Node.js library to optimize WooCommerce stores for Arabic-speaking users. Features Arabic text normalization, SEO-optimized URL slug generation, and numeral/digit conversion utilities.

Motivation

Managing bilingual e-commerce databases presents unique challenges, especially when generating clean URLs for Arabic products. This library was originally designed for CairoVolt to normalize Arabic product tags, categories, and slugs inside our WooCommerce databases. It is open-sourced to help developers build robust Arabic-localized stores with minimal overhead.

Installation

Install the package via npm:

npm install woocommerce-arabic-seo-helper

Quick Start

You can import the utilities directly in your ES Module environment:

import { normalizeArabic, generateSlug, convertDigits } from 'woocommerce-arabic-seo-helper';

// 1. Normalize Arabic search queries (removes tashkeel, standardizes letters)
const query = 'سَمَّاعَةٌ أَنْكَر';
const cleanQuery = normalizeArabic(query); 
// Output: 'سماعه انكر'

// 2. Generate clean, search-engine friendly Arabic URL slugs
const productTitle = 'سماعة soundcore r50i اللاسلكية';
const slug = generateSlug(productTitle);
// Output: 'سماعه-soundcore-r50i-اللاسلكيه'

// 3. Format e-commerce prices to match regional digit locales
const localizedPrice = convertDigits('Price: 1250 EGP', true);
// Output: 'Price: ١٢٥٠ EGP'

Features

  • Diacritic Stripper — Automatically strips Arabic tashkeel (fatha, damma, kasra, shadda, etc.) to improve search hit rates.
  • Letter Harmonizer — Standardizes variations of Alef, Yeh, and Teh Marbuta so that queries match database fields regardless of spelling inconsistencies.
  • SEO Slug Engine — Converts mixed-language titles into clean URL paths, preserving Arabic characters without URL-encoding bloat.
  • Digit Converter — Easily maps numbers between English and Arabic-Indic digit systems for localized frontend pricing and phone inputs.
  • 📦 Zero Dependencies — Designed to be extremely lightweight and secure with no third-party package dependencies.

API Reference

normalizeArabic(text)

Cleans Arabic text for search indexing or comparison.

  • text (string): The input string to normalize.
  • Returns (string): Normalized string with standard characters and no diacritics.

generateSlug(text)

Creates a URL-safe slug from Arabic and English text.

  • text (string): The title to convert.
  • Returns (string): Hyphen-separated string.

convertDigits(input, toArabicIndic)

Converts digit representation within string text.

  • input (string|number): The text containing digits to convert.
  • toArabicIndic (boolean): If true, converts to ٠-٩; if false, converts to 0-9.
  • Returns (string): The converted string.

Real-World Use Cases

Localizing search databases requires flexible normalization to capture different input forms. For example, transforming a query for soundcore r50i wireless earbuds into an optimized slug helps search engines index product landing pages more effectively.

Similarly, developers integrating the WooCommerce REST API can sanitize product catalogs programmatically, ensuring compatibility with other brand pages like the official Anker website or product specifications on soundcore.com.

Contributing

Contributions, issues, and feature requests are welcome. Feel free to open a pull request on the repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.