UNPKG

ipa-code-util

Version:
27 lines (26 loc) 3.69 kB
/** * @file IPA Unicode utilities * @version 1.0.5 * @author Greg Borota * @copyright (c) 2017 Greg Borota. * @license MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("aramaic-mapper")):"function"==typeof define&&define.amd?define(["exports","aramaic-mapper"],a):a(e.ipaCodeUtil={},e.aramaicMapper)}(this,function(e,a){"use strict";var l=Object.freeze(Object.create(null,{alaph:{value:"ʔ",enumerable:!0},beth:{value:"b",enumerable:!0},gamal:{value:"g",enumerable:!0},dalath:{value:"d",enumerable:!0},he:{value:"h",enumerable:!0},waw:{value:"w",enumerable:!0},zayn:{value:"z",enumerable:!0},heth:{value:"ħ",enumerable:!0},teth:{value:"ᵵ",enumerable:!0},yod:{value:"j",enumerable:!0},kaph:{value:"k",enumerable:!0},lamadh:{value:"l",enumerable:!0},mim:{value:"m",enumerable:!0},nun:{value:"n",enumerable:!0},semkath:{value:"s",enumerable:!0},e:{value:"ʕ",enumerable:!0},pe:{value:"p",enumerable:!0},sadhe:{value:"ᵴ",enumerable:!0},qoph:{value:"q",enumerable:!0},resh:{value:"r",enumerable:!0},shin:{value:"ʃ",enumerable:!0},taw:{value:"t",enumerable:!0}})),n=l,u=Object.freeze([n.alaph,n.beth,n.gamal,n.dalath,n.he,n.waw,n.zayn,n.heth,n.teth,n.yod,n.kaph,n.lamadh,n.mem,n.nun,n.semkath,n.e,n.pe,n.sadhe,n.qoph,n.resh,n.shin,n.taw]),t=[n.beth,n.gamal,n.dalath,n.kaph,n.pe,n.taw],r=["v","ɣ","ð","x","f","θ"],m=Object.freeze(Object.create(null,{b:{value:"v",enumerable:!0},g:{value:"ɣ",enumerable:!0},d:{value:"ð",enumerable:!0},k:{value:"x",enumerable:!0},p:{value:"f",enumerable:!0},t:{value:"θ",enumerable:!0}})),b=["ɬ","ᵭ","ᵶ"],o=Object.freeze(u.concat(r).concat(b)),h=Object.freeze(Object.create(null,{pthaha:{value:"a",enumerable:!0},zqapha:{value:"ɑ",enumerable:!0},rbasa:{value:"e",enumerable:!0},hbasa:{value:"i",enumerable:!0},esasa:{value:"u",enumerable:!0},zlama:{value:"ɛ",enumerable:!0},rwaha:{value:"o",enumerable:!0}})),s=h,v=Object.freeze([s.pthaha,s.zqapha,s.rbasa,s.hbasa,s.esasa]),c=Object.freeze([s.zlama,s.rwaha]),i=Object.freeze(["ʊ","ɪ","ɔ"]),p=Object.freeze(v.concat(c).concat(i)),f=function(e){return p.indexOf(e)>-1},d=a.hasDotting(f),w=a.clearDotting(f);e.consonantsByName=l,e.consonants=u,e.begadkepatConsonants=t,e.veghadhkhefathConsonants=r,e.begadkepatMap=m,e.extraConsonants=b,e.allConsonants=o,e.vowelsByName=h,e.commonVowels=v,e.easternVowels=c,e.otherVowels=i,e.allVowels=p,e.silent="∅",e.isConsonant=function(e){return o.indexOf(e)>-1},e.isVowel=f,e.isDotted=d,e.removeVowels=w,e.isBegadkepat=function(e){return t.indexOf(e)>-1},e.isVeghadhkhefath=function(e){return r.indexOf(e)>-1},Object.defineProperty(e,"__esModule",{value:!0})});