ipa-code-util
Version:
IPA Unicode utilities
240 lines (168 loc) • 9.96 kB
Markdown
# ipa-code-util
[](https://badge.fury.io/js/ipa-code-util)
[](https://www.npmjs.org/package/ipa-code-util)
[](https://travis-ci.org/peshitta/ipa-code-util)
[](https://github.com/peshitta/ipa-code-util/blob/master/LICENSE)
[](https://david-dm.org/peshitta/ipa-code-util)
[](https://coveralls.io/github/peshitta/ipa-code-util?branch=master)
[](https://gitter.im/peshitta/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
IPA Unicode utilities
## Installation
In order to use this library, [Node.js](https://nodejs.org) should be installed.
Then run:
```
npm install ipa-code-util --save
```
Following bundles are available:
* `ipa-code-util.js` - UMD ES5 version for use in browser, node, etc.
* `ipa-code-util.min.js` - minified version of `ipa-code-util.js`
* `ipa-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/ipa-code-util/-/ipa-code-util-1.0.5.tgz](https://registry.npmjs.org/ipa-code-util/-/ipa-code-util-1.0.5.tgz)
## More information
[Peshitta App](https://peshitta.github.io)
[IPA](https://en.wikipedia.org/wiki/International_Phonetic_Alphabet)
[Beth Mardutho](https://sedra.bethmardutho.org/about/fonts)
[CAL](http://cal1.cn.huc.edu/searching/fullbrowser.html)
## License
[MIT](https://github.com/peshitta/ipa-code-util/blob/master/LICENSE)
## Contributing
The final goal for this work is to learn the Word of God as recorded by
[Peshitta](https://en.wikipedia.org/wiki/Peshitta).
You are welcomed to improve this implementation or provide feedback. Please
feel free to [Fork](https://help.github.com/articles/fork-a-repo/), create a
[Pull Request](https://help.github.com/articles/about-pull-requests/) or
submit [Issues](https://github.com/peshitta/ipa-code-util/issues).
To read quick updates about Peshitta app or post questions or feedback, follow
[@peshittap](https://www.twitter.com/peshittap)
at [](https://www.twitter.com/peshittap)or
[](https://gitter.im/peshitta/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
## Development
```
npm install
```
```
npm run build
```
## API Reference
* [ipaCodeUtil](#module_ipaCodeUtil)
* [.consonantsByName](#module_ipaCodeUtil.consonantsByName) : <code>Object.<string, string></code>
* [.consonants](#module_ipaCodeUtil.consonants) : <code>Array.<string></code>
* [.begadkepatConsonants](#module_ipaCodeUtil.begadkepatConsonants) : <code>Array.<string></code>
* [.veghadhkhefathConsonants](#module_ipaCodeUtil.veghadhkhefathConsonants) : <code>Array.<string></code>
* [.begadkepatMap](#module_ipaCodeUtil.begadkepatMap) : <code>Object.<string, string></code>
* [.extraConsonants](#module_ipaCodeUtil.extraConsonants) : <code>Array.<string></code>
* [.allConsonants](#module_ipaCodeUtil.allConsonants) : <code>Array.<string></code>
* [.vowelsByName](#module_ipaCodeUtil.vowelsByName) : <code>Object.<string, string></code>
* [.commonVowels](#module_ipaCodeUtil.commonVowels) : <code>Array.<string></code>
* [.easternVowels](#module_ipaCodeUtil.easternVowels) : <code>Array.<string></code>
* [.otherVowels](#module_ipaCodeUtil.otherVowels) : <code>Array.<string></code>
* [.allVowels](#module_ipaCodeUtil.allVowels) : <code>Array.<string></code>
* [.silent](#module_ipaCodeUtil.silent) : <code>string</code>
* [.isConsonant](#module_ipaCodeUtil.isConsonant) ⇒ <code>boolean</code>
* [.isVowel](#module_ipaCodeUtil.isVowel) ⇒ <code>boolean</code>
* [.isDotted](#module_ipaCodeUtil.isDotted) ⇒ <code>boolean</code>
* [.removeVowels](#module_ipaCodeUtil.removeVowels) ⇒ <code>string</code>
* [.isBegadkepat](#module_ipaCodeUtil.isBegadkepat) ⇒ <code>boolean</code>
* [.isVeghadhkhefath](#module_ipaCodeUtil.isVeghadhkhefath) ⇒ <code>boolean</code>
<a name="module_ipaCodeUtil.consonantsByName"></a>
### ipaCodeUtil.consonantsByName : <code>Object.<string, string></code>
IPA consonant name to value map
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.consonants"></a>
### ipaCodeUtil.consonants : <code>Array.<string></code>
Semitic 22 base consonants
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.begadkepatConsonants"></a>
### ipaCodeUtil.begadkepatConsonants : <code>Array.<string></code>
Begadkepat consonants
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.veghadhkhefathConsonants"></a>
### ipaCodeUtil.veghadhkhefathConsonants : <code>Array.<string></code>
Veghadhkhefath consonants
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.begadkepatMap"></a>
### ipaCodeUtil.begadkepatMap : <code>Object.<string, string></code>
Begadkepat to veghadhkhefath map
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.extraConsonants"></a>
### ipaCodeUtil.extraConsonants : <code>Array.<string></code>
Other semitic consonants
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.allConsonants"></a>
### ipaCodeUtil.allConsonants : <code>Array.<string></code>
All consonants concatenated
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.vowelsByName"></a>
### ipaCodeUtil.vowelsByName : <code>Object.<string, string></code>
IPA vowel name to value map
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.commonVowels"></a>
### ipaCodeUtil.commonVowels : <code>Array.<string></code>
Common aramaic vowels
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.easternVowels"></a>
### ipaCodeUtil.easternVowels : <code>Array.<string></code>
Eastern/hebrew only vowels
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.otherVowels"></a>
### ipaCodeUtil.otherVowels : <code>Array.<string></code>
Other semitic vowels
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.allVowels"></a>
### ipaCodeUtil.allVowels : <code>Array.<string></code>
Semitic vowels including Eastern/Hebrew ones and other short vowels.
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.silent"></a>
### ipaCodeUtil.silent : <code>string</code>
The silent letter symbol
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
<a name="module_ipaCodeUtil.isConsonant"></a>
### ipaCodeUtil.isConsonant ⇒ <code>boolean</code>
Is character c a semitic consonant
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
**Returns**: <code>boolean</code> - true if c is semitic consonant
| Param | Type | Description |
| --- | --- | --- |
| c | <code>string</code> | input character |
<a name="module_ipaCodeUtil.isVowel"></a>
### ipaCodeUtil.isVowel ⇒ <code>boolean</code>
Is character c a semitic vowel
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
**Returns**: <code>boolean</code> - true if c is semitic vowel
| Param | Type | Description |
| --- | --- | --- |
| c | <code>string</code> | input character |
<a name="module_ipaCodeUtil.isDotted"></a>
### ipaCodeUtil.isDotted ⇒ <code>boolean</code>
Return true if input word has vowels or diacritics
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
**Returns**: <code>boolean</code> - true if word has vowels or diacritics
| Param | Type | Description |
| --- | --- | --- |
| word | <code>string</code> | input word |
<a name="module_ipaCodeUtil.removeVowels"></a>
### ipaCodeUtil.removeVowels ⇒ <code>string</code>
Remove vowels, leaving consonantal word only.
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
**Returns**: <code>string</code> - consonantal word
| Param | Type | Description |
| --- | --- | --- |
| word | <code>string</code> | input word to be processed |
<a name="module_ipaCodeUtil.isBegadkepat"></a>
### ipaCodeUtil.isBegadkepat ⇒ <code>boolean</code>
Returns true if c is a begadkepat consonant
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
**Returns**: <code>boolean</code> - true if c is a begadkepat consonant
| Param | Type | Description |
| --- | --- | --- |
| c | <code>string</code> | input character |
<a name="module_ipaCodeUtil.isVeghadhkhefath"></a>
### ipaCodeUtil.isVeghadhkhefath ⇒ <code>boolean</code>
Returns true if c is a veghadhkhefath consonant
**Kind**: static constant of [<code>ipaCodeUtil</code>](#module_ipaCodeUtil)
**Returns**: <code>boolean</code> - true if c is a veghadhkhefath consonant
| Param | Type | Description |
| --- | --- | --- |
| c | <code>string</code> | input character |