Skip to content

transliterate

transliterate(text, schema?): string

Defined in: src/transliterate.ts:74

Transliterates Hebrew text according to a given schema

ParameterTypeDescription
textstring | Texta string or Text of Hebrew characters
schema?Schema | Partial<Schema>a Schema for transliterating the text

string

a transliterated text

Default

import { transliterate } from "hebrew-transliteration";
transliterate("אֱלֹהִים");
// "ʾĕlōhîm";

Using Partial<Schema>

import { transliterate } from "hebrew-transliteration";
transliterate("שָׁלוֹם", { SHIN: "sh" })
// shālôm

Using a custom Schema

import { transliterate, Schema } from "hebrew-transliteration";
const schema = new Schema({ ALEF: "'", BET: "B", ... QAMETS: "A", ... }) // truncated for brevity
transliterate("אָ֣ב", schema)
// 'AB

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.