hebrew-transliteration
Transliterate Unicode Hebrew text according to SBL's guidelines
install
npm
npm install --save hebrew-transliteration
local
Download or clone this repository.
cd hebrew-transliteration
npm install
npm run build
example
const heb = require("hebrew-transliteration");
const transliterate = heb.transliterate;
transliterate("אֱלֹהִים") >>> "ʾĕlōhîm";
DOCS
transliterate
heb.transliterate(text, { isSequenced: true, qametsQatan: false, isSimple: false });
Takes text
<<String>> and [options]
<<Object>>.
heb.transliterate("כָּל־הָעָם") >>> "kāl-hāʿām";
heb.transliterate("כָּל־הָעָם", { qametsQatan: true }) >>> "kol-hāʿām";
heb.transliterate("שָׁלֹום") >>> "šālôm";
heb.transliterate("שָׁלֹום", { isSimple: true }) >>> "shalom";
remove
heb.remove(text, { removeVowels: false });
Takes text
<<String>> and [options]
<<Object>>. With {removeVowels: false}
, will only remove cantillation (i.e., accent) marks.
heb.remove("כָּל־הָעָם", { removeVowels: true }) >>> "כל־העם";
sequence
heb.sequence(text);
Takes text
<<String>>. Returns a string of properly sequenced characters according to the SBL Hebrew Font manual.
heb.sequence("\u{5D1}\u{5B0}\u{5BC}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5B4}\u{5C1}\u{596}\u{5D9}\u{5EA}") >>>
"\u{5D1}\u{5BC}\u{5B0}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5C1}\u{5B4}\u{596}\u{5D9}\u{5EA}";
License
MIT
Live
Use it live at charlesLoder.github.io/hebrewTransliteration
Changelong
- v1.1.0: in
transliterate()
theoptions
was changed from the misspelledisSeqeunced
toisSequenced
. - v1.2.0:
- rewrote in in TypeScript
- added
isSimple
option totransliterate()
for SBL's General Purpose Style
Contributing
Please feel free to Fork, create Pull Requests, or submit issues. This is my first npm package, so any feedback is appreciated!