Thank you for your interest in contributing to Arabic Services! This library is dedicated to providing reliable, well-tested, and clean utility functions for processing Arabic text in Node.js and the browser.
- Fork and clone the repository:
git clone https://github.com/<your-username>/Arabic-Services-JavaScript.git cd Arabic-Services-JavaScript
- Install dependencies:
npm install
- Verify tests pass:
npm test
We follow the Conventional Commits specification to keep the Git history clean and predictable:
<type>(<optional scope>): <description>
feat: A new feature or utility function (e.g., adding a new Arabic text filter or character mapping)fix: A bug fix (e.g., correcting Tashkeel stripping for sequential tanween)docs: Documentation-only changes (e.g., README updates, wiki changes)test: Adding or correcting tests (e.g., new test cases intests/scripts.test.ts)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancechore: Tooling, build config, dependency upgrades, or CI/CD adjustments
feat: add sequential tanween to tashkeel list
fix: handle word prefixes correctly in removeAffixes
docs: clarify browser bundle usage via CDN
test: add test cases for dotless noon transformation
chore: update devDependencies to latest versions
Before submitting a Pull Request, please ensure:
- Tests pass:
Add unit tests in
npm testtests/scripts.test.tsfor any new logic or bug fix. - Code is clean and formatted:
npm run lint npm run format
- TypeScript builds cleanly:
npm run build
When contributing text processing logic:
- Pure Functions: Keep functions deterministic, side-effect free, and performant.
- Unicode Awareness: Arabic diacritics (Harakat/Tashkeel) and special characters (Tatweel, Wasla, Madda) have specific Unicode codepoints. Make sure regex patterns and character checks account for them correctly.
- Dual Runtime Support: Ensure changes work seamlessly in both Node.js and web browsers. Avoid importing Node-only packages into
src/.