[go: up one dir, main page]

Skip to content
/ m3dood Public

A function to get the grammatically correct "m3dood" for a number in Arabic.

License

Notifications You must be signed in to change notification settings

cdes/m3dood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status NPM

M3dood معدود

A function to get the grammatically correct "m3dood" for a number in Arabic.

دالة توفر المعدود العربي الصحيح نحوياً للرقم المعطى


Provides the grammatically correct "m3dood" for a number.

  • Simple detection of entity gender
  • Handles entity counts from 0 to 99+

Download & Installation

$ yarn add m3dood
$ npm i m3dood

Usage

import m3dood from 'm3dood';

// initilize your ma3dood
const books = m3dood("كتاب", "كتابان", "كتب");
const libraries = m3dood("مكتبة", "مكتبتان", "مكتبات");

// use it
console.log(books(3), libraries(2));

this will return

"3 كتب"
"مكتبتان"

Examples

  • دون كتب
  • كتاب واحد
  • كتابان
  • 3 كتب
  • 10 كتب
  • 11 كتاب
  • 101 من الكتب
  • 103 كتب

Contributing

Keep it simple. Keep it minimal. Don't put every single feature just because you can.

Authors or Acknowledgments

License

This project is licensed under the MIT License

About

A function to get the grammatically correct "m3dood" for a number in Arabic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published