transliterate
transliterate(
text,schema?):string
Transliterates Hebrew text according to a given schema
Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | Text | a string or Text of Hebrew characters |
schema? | Schema | Partial<Schema> | a Schema for transliterating the text |
Returns
string
a transliterated text
Examples
Default
import { transliterate } from "hebrew-transliteration";
transliterate("אֱלֹהִים");// "ʾĕlōhîm";Using Partial<Schema>
import { transliterate } from "hebrew-transliteration";
transliterate("שָׁלוֹם", { SHIN: "sh" })// shālômUsing a custom Schema
import { transliterate, Schema } from "hebrew-transliteration";
const schema = new Schema({ ALEF: "'", BET: "B", ... QAMETS: "A", ... }) // truncated for brevity
transliterate("אָ֣ב", schema)// 'ABRemarks
If no Schema is passed, then the package defaults to SBL’s academic style. You can pass in a partial schema that will modify SBL’s academic style. If you need a fully custom schema, it is best to use the Schema constructor.