The manualPrintCheat sheet · engine 1.85
GitHubArqam

Arqam cheat sheet

engine 1.85 · every result is the engine's own · the manual · print

Load

npm install arqam
import arqam from "arqam";          // Arabic built in
import "arqam/words";               // reading words back (optional)
import "arqam/en";                  // English (optional)

In a page: <script src="arqamAR.js"> gives the global arqam.

Numbers and amounts

arqam("1234.56")
ألف ومائتان وأربعة وثلاثون، وستة وخمسون جزءًا من المائة
arqam("1234.56", {currency: "QAR"})
ألف ومائتان وأربعة وثلاثون ريالًا قطريًا، وستة وخمسون درهمًا
arqam("2", {currency: "SAR"})
ريالان سعوديان
the dual says two
arqam("-75", {currency: "KWD"})
سالب خمسة وسبعين دينارًا كويتيًا
arqam("12.5%")
اثنا عشر فاصلة خمسة بالمائة
arqam("21", {ordinal: "feminine"})
الحادية والعشرون

Cheques

arqam("1250.5", {currency: "QAR", prefix: "فقط", suffix: "لا غير"})
فقط ألف ومائتان وخمسون ريالًا قطريًا، وخمسون درهمًا لا غير
the cheque form writes «واحد/اثنان»
arqam("2002", {currency: "AED", legal: "auto", brackets: "end"})
ألفان ودرهمان إماراتيان اثنان (2,002.00 AED)
arqam("21", {currency: "QAR", tashkeel: "alif"})
واحد وعشرون ريالًا قطريًا
arqam("0", {currency: "QAR", zeroWords: "لا شيء", prefix: "فقط", suffix: "لا غير"})
فقط لا شيء لا غير

The options used most

OptionValues (default first)What
currency"" | a codean amount (ISO 4217, 188 built in)
tashkeel"" "alif" "endings" "full"vowel marks
ierab"raf" "nasb" "jarr"the case in the sentence
prefix / suffix"" | text«فقط … لا غير»
legal"none" "auto" "full"the legal form
brackets"" "end" "start"the figure in brackets
emphasisOneTwo"" "on" "off"«واحد/اثنان» after the noun
ignoreCountry"off" "on"ريال, not ريال قطري
miah"on" "off"مائة or مئة
compact"off" "on"groups in figures
scale"arabic" "short" "long"مليار or بليون
rounding"" "on" "off"round or cut extra places
locale"" "ar-QA" …the region
zeroWords"" | text«لا شيء» for zero
strict / isNaN"off" "on" / ""bad input: error or value

Dates, times, fractions

arqam.toDate("2026-11-24")
الرابع والعشرون من شهر نوفمبر لعام ألفين وستة وعشرين للميلاد
arqam.toDate("2026-11-24", {year: "sana"})
الرابع والعشرون من شهر نوفمبر سنة ألفين وست وعشرين ميلادية
arqam.toDate("2026-11-24", {calendar: "h"})
الرابع عشر من شهر جمادى الآخرة لعام ألف وأربعمائة وثمانية وأربعين للهجرة
arqam.toTime("15:45")
الساعة الثالثة وخمس وأربعون دقيقةً عصرًا
arqam.toFraction("3 1/2", {currency: "QAR"})
ثلاثة ريالات قطرية، وخمسون درهمًا

Words back to numbers

arqam.fromWords("فقط ألف ومائتان وخمسون ريالا قطريا لا غير")
1250
arqam.verify("ألف ريال قطري", "1000", {currency: "QAR"}).ok
true
arqam.findNumbers("دفع قرابة ألف ريال ثم خمسين").map(x => x.value).join(" | ")
1000 | 50

Settings, Intl, English

(arqam.config({currency: "SAR", tashkeel: "alif"}), arqam("75"))
خمسة وسبعون ريالًا سعوديًا
config() applies to every later call
(arqam.reset(), arqam("75"))
خمسة وسبعون
new arqam.NumberFormat("ar-QA", {style: "currency"}).format(1250.5)
ألف ومائتان وخمسون ريالًا قطريًا، وخمسون درهمًا
arqam("1250.5", "en-GB", {currency: "QAR"})
One Thousand Two Hundred and Fifty Qatari Riyals and Fifty Dirhams

© 2021–2026 Mohsen Alyafei · MIT