arabic-code-util
Arabic Unicode utilities - handling only Garshuni subset
Installation
In order to use this library, Node.js should be installed. Then run:
npm install arabic-code-util --save
Following bundles are available:
arabic-code-util.js
- UMD ES5 version for use in browser, node, etc.arabic-code-util.min.js
- minified version ofarabic-code-util.js
arabic-code-util.esm.js
- ES6 module version, suitable for bundling with other libraries and applications
The package could also be downloaded directly from: https://registry.npmjs.org/arabic-code-util/-/arabic-code-util-1.0.8.tgz
More information
License
Contributing
The final goal for this work is to learn the Word of God as recorded by Peshitta. You are welcomed to improve this implementation or provide feedback. Please feel free to Fork, create a Pull Request or submit Issues.
To read quick updates about Peshitta app or post questions or feedback, follow @peshittap at or
Development
npm install
npm run build
API Reference
- arabicCodeUtil
- .consonantsByName :
Object.<string, string>
- .consonants :
Array.<string>
- .extraConsonants :
Array.<string>
- .allConsonants :
Array.<string>
- .vowelsByName :
Object.<string, string>
- .vowels :
Array.<string>
- .diacriticsByName :
Object.<string, string>
- .diacritics :
Array.<string>
- .punctuation :
Array.<string>
- .letterAsciiMap :
Object.<string, string>
- .dotting :
Array.<string>
- .isConsonant ⇒
boolean
- .isVowel ⇒
boolean
- .isDiacritic ⇒
boolean
- .isPunctuation ⇒
boolean
- .isDotting ⇒
boolean
- .isDotted ⇒
boolean
- .removeDotting ⇒
string
- .sort ⇒
number
- .consonantsByName :
Object.<string, string>
arabicCodeUtil.consonantsByName : Arabic consonants by name
Kind: static constant of arabicCodeUtil
Array.<string>
arabicCodeUtil.consonants : Arabic base 22 consonants common to other semitic languages
Kind: static constant of arabicCodeUtil
Array.<string>
arabicCodeUtil.extraConsonants : Garshuni extras
Kind: static constant of arabicCodeUtil
Array.<string>
arabicCodeUtil.allConsonants : All Arabic consonants relevant to Syriac including Garshuni
Kind: static constant of arabicCodeUtil
Object.<string, string>
arabicCodeUtil.vowelsByName : Arabic/Garshuni vowels by name
Kind: static constant of arabicCodeUtil
Array.<string>
arabicCodeUtil.vowels : Arabic/Garshuni vowels
Kind: static constant of arabicCodeUtil
Object.<string, string>
arabicCodeUtil.diacriticsByName : Arabic/Garshuni diacritics by name
Kind: static constant of arabicCodeUtil
Array.<string>
arabicCodeUtil.diacritics : Arabic/Garshuni diacritics
Kind: static constant of arabicCodeUtil
Array.<string>
arabicCodeUtil.punctuation : Arabic punctuation relevant to Syriac
Kind: static constant of arabicCodeUtil
Object.<string, string>
arabicCodeUtil.letterAsciiMap : CAL to ordinal ASCII value. Used for sorting: a b c d e f g h i j k l m n o p q r s t u v w x y z { |
Kind: static constant of arabicCodeUtil
Array.<string>
arabicCodeUtil.dotting : Vowels and diacritics: used for consonantal only mapping
Kind: static constant of arabicCodeUtil
boolean
arabicCodeUtil.isConsonant ⇒ Is character c an Arabic consonant? Only Syriac relevant are considered.
Kind: static constant of arabicCodeUtil
Returns: boolean
- true if c is Arabic consonant
Param | Type | Description |
---|---|---|
c | string |
input character |
boolean
arabicCodeUtil.isVowel ⇒ Is character c a vowel?
Kind: static constant of arabicCodeUtil
Returns: boolean
- true if c is a vowel
Param | Type | Description |
---|---|---|
c | string |
input character |
boolean
arabicCodeUtil.isDiacritic ⇒ Is character c a diacritic.
Kind: static constant of arabicCodeUtil
Returns: boolean
- true if c is a diacritic
Param | Type | Description |
---|---|---|
c | string |
input character |
boolean
arabicCodeUtil.isPunctuation ⇒ Is character c a punctuation character.
Kind: static constant of arabicCodeUtil
Returns: boolean
- true if c is punctuation
Param | Type | Description |
---|---|---|
c | string |
input character |
boolean
arabicCodeUtil.isDotting ⇒ Returns true if c is dotting character
Kind: static constant of arabicCodeUtil
Returns: boolean
- true if c is dotting
Param | Type | Description |
---|---|---|
c | string |
input character |
boolean
arabicCodeUtil.isDotted ⇒ Return true if input word has vowels or diacritics
Kind: static constant of arabicCodeUtil
Returns: boolean
- true if word has vowels or diacritics
Param | Type | Description |
---|---|---|
word | string |
input Arabic Unicode word |
string
arabicCodeUtil.removeDotting ⇒ Remove dotting (vowels and diacritics), leaving consonantal word only.
Kind: static constant of arabicCodeUtil
Returns: string
- consonantal word
Param | Type | Description |
---|---|---|
word | string |
input word to be processed |
number
arabicCodeUtil.sort ⇒ Comparator function to be used for sorting words
Kind: static constant of arabicCodeUtil
Returns: number
- -1, 0, 1 depending on word sorting
Param | Type | Description |
---|---|---|
word1 | string |
first word to compare |
word2 | string |
second word to compare |