transliterate
transliterate(
text,schema?):string
Defined in: src/transliterate.ts:74
Transliterates Hebrew text according to a given schema
Parameters
Section titled “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
Section titled “Returns”string
a transliterated text
Examples
Section titled “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
Section titled “Remarks”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.