UNPKG

unniqqud

Version:

Remove niqqud (Hebrew vowel diacritics) and/or Ta'amim (Hebrew cantillation diacritics) from text.

2 lines (1 loc) 458 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=[1470,1472,1475,1478];function r(r){return 1456<=r&&r<=1479&&!t.includes(r)}function e(t){return 1425<=t&&t<=1455}function n(t){return function(t){return r(t)||e(t)}(t.charCodeAt(0))}exports.default=function(t,r=n){return[...t].filter(t=>!r(t)).join("")},exports.diacritic=n,exports.niqqud=function(t){return r(t.charCodeAt(0))},exports.taam=function(t){return e(t.charCodeAt(0))};